{"action":"opened","issue":{"url":"https://api.github.com/repos/tcs-de/nodecache/issues/62","repository_url":"https://api.github.com/repos/tcs-de/nodecache","labels_url":"https://api.github.com/repos/tcs-de/nodecache/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/tcs-de/nodecache/issues/62/comments","events_url":"https://api.github.com/repos/tcs-de/nodecache/issues/62/events","html_url":"https://github.com/tcs-de/nodecache/issues/62","id":156772194,"number":62,"title":"Cache backup - Return expired cache when cache expires ","user":{"login":"bneiluj","id":3680497,"avatar_url":"https://avatars.githubusercontent.com/u/3680497?v=3","gravatar_id":"","url":"https://api.github.com/users/bneiluj","html_url":"https://github.com/bneiluj","followers_url":"https://api.github.com/users/bneiluj/followers","following_url":"https://api.github.com/users/bneiluj/following{/other_user}","gists_url":"https://api.github.com/users/bneiluj/gists{/gist_id}","starred_url":"https://api.github.com/users/bneiluj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bneiluj/subscriptions","organizations_url":"https://api.github.com/users/bneiluj/orgs","repos_url":"https://api.github.com/users/bneiluj/repos","events_url":"https://api.github.com/users/bneiluj/events{/privacy}","received_events_url":"https://api.github.com/users/bneiluj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-25T14:56:08Z","updated_at":"2016-05-25T14:56:08Z","closed_at":null,"body":"It would be great to have the possibility to define a backup for an expired cache. \r\n\r\nBasically, instead of listening on `cacheRegion.on( \"expired\", function(key, value )` and then update the cache when it expires. We could have an option defined like that: \r\n\r\n```\r\nmyCache.set( key, val, [ ttl, cacheBackup ], [callback] ) \r\n```\r\n\r\nwhere `cacheBackup` is `true` if we want to have a backup and `false` otherwise. \r\n\r\nWorkflow: \r\n\r\n- When the cache `expires` \r\n- And a `Retrieve a key (GET)` request is made\r\n- It then return an `object` with the `key value pair` and a boolean `CacheBackup` equal to `true` = let the user know that it was an expired cache. \r\n\r\nIt very useful when the http requests fail and the cache has expired. "}}
{"actor":{"display_login":"bneiluj"}}