Redis cache vs using memory directly

Redis is a remote data structure server. It is certainly slower than just storing the data in local memory (since it involves socket roundtrips to fetch/store the data). However, it also brings some interesting properties: Redis can be accessed by all the processes of your applications, possibly running on several nodes (something local memory cannot … Read more

Difference between no-cache and must-revalidate for Cache-Control?

I believe that must-revalidate means : Once the cache expires, refuse to return stale responses to the user even if they say that stale responses are acceptable. Whereas no-cache implies : must-revalidate plus the fact the response becomes stale right away. If a response is cacheable for 10 seconds, then must-revalidate kicks in after 10 … Read more

Tomcat 8 throwing – org.apache.catalina.webresources.Cache.getResource Unable to add the resource

I had the same issue when upgrading from Tomcat 7 to 8: a continuous large flood of log warnings about cache. 1. Short Answer Add this within the Context xml element of your $CATALINA_BASE/conf/context.xml: <!– The default value is 10240 kbytes, even when not added to context.xml. So increase it high enough, until the problem … Read more

How does one write code that best utilizes the CPU cache to improve performance?

The cache is there to reduce the number of times the CPU would stall waiting for a memory request to be fulfilled (avoiding the memory latency), and as a second effect, possibly to reduce the overall amount of data that needs to be transfered (preserving memory bandwidth). Techniques for avoiding suffering from memory fetch latency … Read more