Use eTag caching to determine the state of an API request on the server so when subsequent requests are made, the API returns a status 304 (not modified), indicating that the data has not changed. This prevents the server from having to recalculate the data or marshal it back from the server to the web client, additionally improving performance.
While eTag caching can speed up user interaction with the site by not re-retrieving data that is already current, these etags are cached for a certain number of minutes (as set in the settings). If you are not using real-time pricing and inventory, however, these will be subject to the etag settings as well, so if up to the second inventory is mandatory, then you should disable eTag.
- Go to Administration > System > Settings in the Admin Console.
- Search for Cache Etags.
- Toggle Cache Etags to ON. If ON, Etag caching is enabled, which requires a website restart. The default value is ON.
- Enter a value for the Number of Minutes to Retain Client Etags setting. This is the duration in minutes to allow browsers to cache Web API requests, which requires a website restart. The default value is 5.
- Enter a value for the Number of Minutes to Retain Server Etags setting. This is the duration in minutes for Etags to be valid on the server, which requires a website restart. The default value is 5.
- Click Save.
Please sign in to leave a comment.