{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4659","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4659/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4659/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4659/events","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/4659","id":109948933,"number":4659,"title":"possibility to override default cache lifetime","user":{"login":"gherkins","id":824927,"avatar_url":"https://avatars.githubusercontent.com/u/824927?v=3","gravatar_id":"","url":"https://api.github.com/users/gherkins","html_url":"https://github.com/gherkins","followers_url":"https://api.github.com/users/gherkins/followers","following_url":"https://api.github.com/users/gherkins/following{/other_user}","gists_url":"https://api.github.com/users/gherkins/gists{/gist_id}","starred_url":"https://api.github.com/users/gherkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gherkins/subscriptions","organizations_url":"https://api.github.com/users/gherkins/orgs","repos_url":"https://api.github.com/users/gherkins/repos","events_url":"https://api.github.com/users/gherkins/events{/privacy}","received_events_url":"https://api.github.com/users/gherkins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-06T07:18:04Z","updated_at":"2015-10-06T14:20:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/4659","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/4659","diff_url":"https://github.com/silverstripe/silverstripe-framework/pull/4659.diff","patch_url":"https://github.com/silverstripe/silverstripe-framework/pull/4659.patch"},"body":"this would be really useful imho, as you could define the default cache lifetime in `_ss_environment.php`\r\n`define(\"SS_CACHE_DEFAULT_LIFETIME\", 60*60*8 );`\r\n\r\nSo that the configuration (`SS_Configuration`) itself would be cached longer than the default 10 minutes."},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/comments/145871329","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/4659#issuecomment-145871329","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4659","id":145871329,"user":{"login":"gherkins","id":824927,"avatar_url":"https://avatars.githubusercontent.com/u/824927?v=3","gravatar_id":"","url":"https://api.github.com/users/gherkins","html_url":"https://github.com/gherkins","followers_url":"https://api.github.com/users/gherkins/followers","following_url":"https://api.github.com/users/gherkins/following{/other_user}","gists_url":"https://api.github.com/users/gherkins/gists{/gist_id}","starred_url":"https://api.github.com/users/gherkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gherkins/subscriptions","organizations_url":"https://api.github.com/users/gherkins/orgs","repos_url":"https://api.github.com/users/gherkins/repos","events_url":"https://api.github.com/users/gherkins/events{/privacy}","received_events_url":"https://api.github.com/users/gherkins/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T14:20:56Z","updated_at":"2015-10-06T14:20:56Z","body":"Just to clarify:\r\n\r\nOf course you can set almost any cache lifetimes via `SS_Cache::set_cache_lifetime()` but not the one for the configuration, since its cache is set up before actually reading it.\r\nSo that the configuration would always be cached with the default lifetime, which is at the moment hardcoded to 600secs.\r\n\r\nIn a production environment, I would rather cache the configuration for a way longer time.\r\n\r\nOverriding the default lifetime seemed like a quick solution, that would not break anything..."}}