Application server maintains thread pool which is used to allocate thread to process client requests.
When you want to or plan to use thread local cache in web application, take care of clearing cache before request processing is complete. Because if by mistake your thread local cache data is not cleared from cache, when that thread processes next request, cached data is still there. If actual data is changed in between the two request, you will still get old data from cache.
It becomes very difficult to find out root cause of problems which occurs due to wrong implementation of threadlocal cache in web applications.
So always take care whenever you decide to use threadlocal cache in web applications to improve performance.
Your comments are most welcome.
No comments:
Post a Comment