{"action":"created","issue":{"url":"https://api.github.com/repos/orslumen/record-cache/issues/43","labels_url":"https://api.github.com/repos/orslumen/record-cache/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/orslumen/record-cache/issues/43/comments","events_url":"https://api.github.com/repos/orslumen/record-cache/issues/43/events","html_url":"https://github.com/orslumen/record-cache/issues/43","id":75871124,"number":43,"title":"How to expire cache when ActiveRecord::Persistence::reload() or delete() is called?","user":{"login":"hey-jude","id":6929275,"avatar_url":"https://avatars.githubusercontent.com/u/6929275?v=3","gravatar_id":"","url":"https://api.github.com/users/hey-jude","html_url":"https://github.com/hey-jude","followers_url":"https://api.github.com/users/hey-jude/followers","following_url":"https://api.github.com/users/hey-jude/following{/other_user}","gists_url":"https://api.github.com/users/hey-jude/gists{/gist_id}","starred_url":"https://api.github.com/users/hey-jude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hey-jude/subscriptions","organizations_url":"https://api.github.com/users/hey-jude/orgs","repos_url":"https://api.github.com/users/hey-jude/repos","events_url":"https://api.github.com/users/hey-jude/events{/privacy}","received_events_url":"https://api.github.com/users/hey-jude/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-13T06:44:51Z","updated_at":"2015-10-12T13:02:26Z","closed_at":"2015-10-12T13:02:26Z","body":"http://apidock.com/rails/ActiveRecord/Persistence/reload\r\n\r\nCurrent cache is not expired when reload() or delete() is called."},"comment":{"url":"https://api.github.com/repos/orslumen/record-cache/issues/comments/147392146","html_url":"https://github.com/orslumen/record-cache/issues/43#issuecomment-147392146","issue_url":"https://api.github.com/repos/orslumen/record-cache/issues/43","id":147392146,"user":{"login":"orslumen","id":126882,"avatar_url":"https://avatars.githubusercontent.com/u/126882?v=3","gravatar_id":"","url":"https://api.github.com/users/orslumen","html_url":"https://github.com/orslumen","followers_url":"https://api.github.com/users/orslumen/followers","following_url":"https://api.github.com/users/orslumen/following{/other_user}","gists_url":"https://api.github.com/users/orslumen/gists{/gist_id}","starred_url":"https://api.github.com/users/orslumen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orslumen/subscriptions","organizations_url":"https://api.github.com/users/orslumen/orgs","repos_url":"https://api.github.com/users/orslumen/repos","events_url":"https://api.github.com/users/orslumen/events{/privacy}","received_events_url":"https://api.github.com/users/orslumen/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T13:02:26Z","updated_at":"2015-10-12T13:02:26Z","body":"When calling ```delete``` the ActiveRecord callbacks are not triggered, so in most cases you should use ```destroy``` instead. When this is not possible, Record Cache needs to be informed that a particular is invalid:\r\n\r\n```\r\nPerson.record_cache.invalidate(3)\r\n```\r\n\r\ninforms Record Cache that the ```Person``` record with id ```3``` should be invalidated from the cache."}}