{"action":"opened","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3850","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3850/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3850/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3850/events","html_url":"https://github.com/silverstripe/silverstripe-framework/issues/3850","id":56552153,"number":3850,"title":"RestfulService never using the cache","user":{"login":"giovdk21","id":511350,"avatar_url":"https://avatars.githubusercontent.com/u/511350?v=3","gravatar_id":"","url":"https://api.github.com/users/giovdk21","html_url":"https://github.com/giovdk21","followers_url":"https://api.github.com/users/giovdk21/followers","following_url":"https://api.github.com/users/giovdk21/following{/other_user}","gists_url":"https://api.github.com/users/giovdk21/gists{/gist_id}","starred_url":"https://api.github.com/users/giovdk21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovdk21/subscriptions","organizations_url":"https://api.github.com/users/giovdk21/orgs","repos_url":"https://api.github.com/users/giovdk21/repos","events_url":"https://api.github.com/users/giovdk21/events{/privacy}","received_events_url":"https://api.github.com/users/giovdk21/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-04T16:42:13Z","updated_at":"2015-02-04T16:42:13Z","closed_at":null,"body":"\r\nHello,\r\nfrom my understanding at in framework/api/RestfulService.php, line 187, you're checking if flush is set to ignore the cache, but you're missing a negation in the if:\r\n\r\n`if($this->cache_expire > 0 && self::$flush` ...\r\n\r\nshould be\r\n\r\n`if($this->cache_expire > 0 && !self::$flush` ...\r\n\r\nAm I right? (the documentation says \"unless\" too)\r\n\r\nTo test this you can add the following line after the else:\r\n\r\n`Debug::log('API request: '.$url.' -- '.$this->cache_expire. ' -- flush: '. (self::$flush ? 'Y' : 'N'));`\r\n\r\nThanks."}}