{"action":"created","issue":{"url":"https://api.github.com/repos/headissue/cache2k/issues/20","labels_url":"https://api.github.com/repos/headissue/cache2k/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/headissue/cache2k/issues/20/comments","events_url":"https://api.github.com/repos/headissue/cache2k/issues/20/events","html_url":"https://github.com/headissue/cache2k/issues/20","id":86661120,"number":20,"title":"Fixed-time caching, caches for ever!","user":{"login":"mohsen","id":50930,"avatar_url":"https://avatars.githubusercontent.com/u/50930?v=3","gravatar_id":"","url":"https://api.github.com/users/mohsen","html_url":"https://github.com/mohsen","followers_url":"https://api.github.com/users/mohsen/followers","following_url":"https://api.github.com/users/mohsen/following{/other_user}","gists_url":"https://api.github.com/users/mohsen/gists{/gist_id}","starred_url":"https://api.github.com/users/mohsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohsen/subscriptions","organizations_url":"https://api.github.com/users/mohsen/orgs","repos_url":"https://api.github.com/users/mohsen/repos","events_url":"https://api.github.com/users/mohsen/events{/privacy}","received_events_url":"https://api.github.com/users/mohsen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/headissue/cache2k/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/headissue/cache2k/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-06-09T16:41:25Z","updated_at":"2015-07-29T02:50:30Z","closed_at":null,"body":"Hi,\r\nI used to use Google guava cache for fixed-time caching of certain contents on a web application. After knowing about cache2k, I wrote a small facade to be able to switch between cache2k and guava, and changed my default cache framework to cache2k on a high traffic website (~100k unique users per day). I switched to cache2k for two reasons.\r\nFirst it's out of the box JMX support.\r\nSecond I assumed that when my DB fails for any reason, and so ``org.cache2k.CacheSource.get(K)`` throws any exception, cache2k continues to return old cached values for the keys. So my website home page would continue to work even after DB gets down.\r\n\r\nI was satisfied with JMX support but about the second I was wrong. Please tell me if this is intended behavior that cache fails when CacheSource.get() fails.\r\n\r\nWell, this post is about another issue which seems to be very severe:\r\nThe problem is about fixed-time caching and *strong* caching of cache2k. In my high traffic website fixed-time caching never refreshed after a couple of days, that is, it kept old values and did not update values every 1 minute (1 minute was my fixed caching period). The case was getting bad when I added an API to do a ``org.cache2k.Cache.remove(K)`` for failed caches so that website admin can refresh a cache himself. It works for some days but again fails after that. and Cache.remove(K) did nothing.\r\n\r\nSwitching back to guava, everything works fine."},"comment":{"url":"https://api.github.com/repos/headissue/cache2k/issues/comments/125819077","html_url":"https://github.com/headissue/cache2k/issues/20#issuecomment-125819077","issue_url":"https://api.github.com/repos/headissue/cache2k/issues/20","id":125819077,"user":{"login":"cruftex","id":2668191,"avatar_url":"https://avatars.githubusercontent.com/u/2668191?v=3","gravatar_id":"","url":"https://api.github.com/users/cruftex","html_url":"https://github.com/cruftex","followers_url":"https://api.github.com/users/cruftex/followers","following_url":"https://api.github.com/users/cruftex/following{/other_user}","gists_url":"https://api.github.com/users/cruftex/gists{/gist_id}","starred_url":"https://api.github.com/users/cruftex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cruftex/subscriptions","organizations_url":"https://api.github.com/users/cruftex/orgs","repos_url":"https://api.github.com/users/cruftex/repos","events_url":"https://api.github.com/users/cruftex/events{/privacy}","received_events_url":"https://api.github.com/users/cruftex/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T02:50:30Z","updated_at":"2015-07-29T02:50:30Z","body":"I will provide a mechanism to switch off the timer usage completely, so we can easily check whether this could be the problem source."}}