2 ms·
Caching not necessarily means more speed. Sometimes it can make things slower. 1. Get from cache 2. Determine if cached value is valid 3. Query data store 4
by partycoder 10y ago
Caching not necessarily means more speed. Sometimes it can make things slower.
1. Get from cache
2. Determine if cached value is valid
3. Query data store
4. Put data store value in cache
5. Return data
Instead of just getting it directly. In order to be able to cache you need to think about good cache invalidation. And client side caching won't work against malicious users.
- benchaney 10y agoThose are problems the CDN solves for you.
- partycoder 10y agoCDN is only for static content and I was assumed all your static content would be already on a CDN... it's a standard practice.
- modoc 10y agoCDN is NOT only for static content. Minimally Cacheable, or catchable based on cookie value, content can be cached on a CDN. Also running ALL traffic through a CDN (like CloudFlare or Akamai) allows you to do traffic optimization, FEO, DDOS protection, and much more.