Cache
Caching is a temporary storage of data that speeds up your online store by reusing already processed information instead of retrieving and recalculating it every time. This is crucial for performance and user experience.
What is a cache?
A cache (pronounced “kash”) is a temporary storage area that stores copies of data so they can be delivered more quickly the next time they’re requested. When a visitor loads a page in your online store, the server normally has to retrieve data from the database, process templates, generate HTML, and send it to the browser. With caching, the result is stored so that the next visit can be served directly without all that processing.
Caching occurs at many levels—from the browser’s local cache to server-side caching and CDN caching. Together, they can dramatically reduce page load times.
Types of Cache
Browser cache
The browser stores files such as images, CSS, JavaScript, and fonts locally on the user’s device. The next time the user visits your store, these files are loaded from the local cache instead of being downloaded again. Controlled via HTTP cache headers (Cache-Control, Expires, ETag).
Server-side cache
The server stores pre-generated pages or partial results so they can be served without running the entire generation process for every request. This can include:
- Template cache: Compiled templates are reused instead of being parsed each time.
- Database cache: Results of frequent database queries are stored in memory.
- Object cache: Calculated objects (e.g., product data) are temporarily stored.
CDN cache
A Content Delivery Network (CDN) distributes copies of your static files to servers around the world. Users receive the files from the nearest server, which significantly reduces latency.
Application cache
Application-level caching using systems like Redis or Memcached. Stores frequently used data in the server’s RAM for extremely fast access.
Caching in Shoporama
Shoporama uses multiple caching layers to optimize performance:
- Smarty template cache: Compiled templates are automatically cached and regenerated when the template is modified.
- Feed cache: Product feeds (Google Shopping, PriceRunner, Kelkoo, etc.) are cached for 1–6 hours to reduce server load.
- Sitemap cache: XML sitemaps are cached for 1 hour.
- Image cache: Generated thumbnails are cached so they don’t have to be resized every time they’re displayed.
- Stock Status Cache: Product stock status is cached for fast display.
Why is caching important?
- Faster loading: Cached pages load significantly faster, providing a better user experience.
- Better SEO: Google uses Core Web Vitals (speed) as a ranking factor. Faster pages rank higher.
- Lower server load: Caching reduces the number of database queries and calculations, which saves server resources.
- Better conversion rates: Studies show that a 1-second delay can reduce conversions by up to 7%.
Caching challenges
- Outdated data: Cached data may display outdated prices, inventory status, or content. Cache invalidation (clearing the cache when data changes) is one of the most difficult problems in software development.
- Personalized content: Pages with personalized content (shopping cart, customer-specific prices) cannot be cached in the same way as static pages.
- Debugging: Caching can make debugging more difficult because changes do not appear immediately.
How to Use Shoporama
Guides that demonstrate the concept in practice
We know online marketing in Shoporama
We've been working with online marketing ourselves for decades. As the only shop system in the country, we have spoken multiple times at conferences such as Marketingcamp, SEOday, Shopcamp, Digital Marketing, E-commerce Manager, Ecommerce Day, Web Analytics Wednesday and many more.