mbien commented on pull request #63:
URL: https://github.com/apache/roller/pull/63#issuecomment-641830303


   i am not part of the project team, but I will try to respond anyway:
   
   LRUCacheImpl is actually very simple. It uses a LinkedHashMap with a single 
method overridden to make it a fixed size LRU cache. It is synchronized yes, 
but the critical section is so small that it won't make a difference for a lot 
if not most deployments. I would like to see it as default tbh (I am using it 
for my blog).
   
   ExpiringLRUCacheImpl: i am not quite sure what problem it was supposed to 
solve. But the current implementation only removes expired entries after a 
cache hit. Maybe its just there to refresh the cache if someone edits something 
in the db without invalidating cached item. But its basically a LRUCacheImple 
with expiration logic added to it - also fairly simple.
   
   If you are running a larger blog server with high traffic you will probably 
disable rollers cache and have something like nginx running in front of it. A 
synchronized hash map with get() contention is probably the least of your 
problems ;)
   
   That being said, having a CacheImpl which uses Guava's CacheBuilder would be 
interesting, but i can't imagine it would be a high priority. I might just give 
it a try on a rainy day - should be trivial to add, although of limited use for 
my own blog.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to