Enhancing API Performance with On-Demand Caching
At PSRESTful, we leverage on-demand caching to significantly boost the performance of our APIs, particularly those related to Catalog creation. By caching frequently accessed data, we ensure faster response times and a more efficient user experience. This approach is based on the recommendations of the PromoStandards Best Practices Committee.
Caching is crucial for optimizing API performance. By storing frequently accessed data in a cache, we reduce the load on our servers and speed up response times for our users. This is especially important for clients importing large catalogs from suppliers such as Ariel, HIT, or SanMar. With effective caching, the time required to import a whole catalog can be drastically reduced, enhancing productivity and efficiency.
We use different cache timeouts for various services and methods to balance data freshness and performance. Here is a detailed list of our caching policies:
Service | Method | PSRESTful Endpoint | Cache Timeout |
---|---|---|---|
Product Data | getProductSellable | /sellable-products/ | 1 day |
Product Data | getProduct | /products/:product_id/ | 1 week |
Product Data | getProductCloseOut | /products-closeout/ | 1 day |
Product Data | getProductDateModified | /products-modified-since/ | 1 day |
Media Content | getMediaContent | /medias/:product_id/ | 1 week |
Media Content | getMediaDateModified | /media-modified-since/ | 1 day |
PPC | getAvailableLocations | /available-locations/:product_id/ | 1 week |
PPC | getDecorationColors | /decoration-colors/ | 1 week |
PPC | getFobPoints | /fob-points/:product_id/ | 1 week |
PPC | getAvailableCharges | /available-charges/:product_id/ | 1 week |
PPC | getConfigurationAndPricing | /pricing-and-configuration/:product_id/ | 1 week |
INV | getFilterValues | /filter-values/:product_id/ | 1 day |
INV | getInventoryLevels | /inventory/:product_id/ | 4 hours |
The other services are currently transactional, not cached.
"Cache-Control": "no-cache"
to your HTTP Headers.