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 cache?
Cache (pronounced "kash") is a cache that stores copies of data so it can be delivered faster on the next request. When a visitor requests a page in your online store, the server usually has to retrieve data from the database, process templates, generate HTML and send it to the browser. With caching, the result is stored so the next visit can be delivered directly without all that processing.
Caching exists on many levels - from browser local cache to server-side cache and CDN cache. Together, they can dramatically reduce loading time.
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 shop, these files are loaded from the local cache instead of downloading them 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 delivered without running the entire generation process for each request. This can be:
- 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 get the files from the closest server, significantly reducing latency.
Application Cache
Application-level caching with 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 changes.
- 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 scaled with each view.
- Stock status cache: Product stock status is cached for quick viewing.
Why is caching important?
- Faster loading: Cached pages load significantly faster, resulting in a better user experience.
- Better SEO: Google uses Core Web Vitals (speed) as a ranking factor. Faster pages rank better.
- Lower server load: Caching reduces the number of database queries and calculations, saving server resources.
- Better conversion: Studies show that a 1-second delay can reduce conversions by up to 7%.
Caching challenges
- Outdated data: Cached data can show outdated prices, stock status or content. Cache invalidation (clearing cache when data changes) is one of the most difficult problems in software development.
- Personalized content: Pages with personalized content (cart, customer-specific prices) cannot be cached in the same way as static pages.
- Debugging: Caching can make debugging more difficult because changes are not immediately visible.
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.