{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/10423","labels_url":"https://api.github.com/repos/laravel/framework/issues/10423/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/10423/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/10423/events","html_url":"https://github.com/laravel/framework/issues/10423","id":109035645,"number":10423,"title":"Tagged caches don't fire cache events.","user":{"login":"valorin","id":897369,"avatar_url":"https://avatars.githubusercontent.com/u/897369?v=3","gravatar_id":"","url":"https://api.github.com/users/valorin","html_url":"https://github.com/valorin","followers_url":"https://api.github.com/users/valorin/followers","following_url":"https://api.github.com/users/valorin/following{/other_user}","gists_url":"https://api.github.com/users/valorin/gists{/gist_id}","starred_url":"https://api.github.com/users/valorin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valorin/subscriptions","organizations_url":"https://api.github.com/users/valorin/orgs","repos_url":"https://api.github.com/users/valorin/repos","events_url":"https://api.github.com/users/valorin/events{/privacy}","received_events_url":"https://api.github.com/users/valorin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-30T07:59:13Z","updated_at":"2015-09-30T10:02:17Z","closed_at":null,"body":"Laravel v5.1\r\n\r\nTagged caches don't fire the cache events listed here: http://laravel.com/docs/5.1/cache#cache-events\r\n\r\nNon-tagged caches use the Repository class: https://github.com/laravel/framework/blob/5.1/src/Illuminate/Cache/Repository.php#L95-L108\r\n```\r\n    public function get($key, $default = null)\r\n    {\r\n        $value = $this->store->get($key);\r\n        if (is_null($value)) {\r\n            $this->fireCacheEvent('missed', [$key]);\r\n            $value = value($default);\r\n        } else {\r\n            $this->fireCacheEvent('hit', [$key, $value]);\r\n        }\r\n        return $value;\r\n    }\r\n```\r\n\r\nTagged caches extend from the TaggedCache class: https://github.com/laravel/framework/blob/5.1/src/Illuminate/Cache/TaggedCache.php#L57-L62\r\n```\r\n    public function get($key, $default = null)\r\n    {\r\n        $value = $this->store->get($this->taggedItemKey($key));\r\n        return ! is_null($value) ? $value : value($default);\r\n    }\r\n```\r\n\r\nI can have a go at adding it in and create a PR with these changes, if you'd like me to. I haven't yet as I saw https://github.com/laravel/framework/issues/9967 and figured that if it was being fixed then it this one can possibly be fixed at the same time. :-)"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/144344823","html_url":"https://github.com/laravel/framework/issues/10423#issuecomment-144344823","issue_url":"https://api.github.com/repos/laravel/framework/issues/10423","id":144344823,"user":{"login":"valorin","id":897369,"avatar_url":"https://avatars.githubusercontent.com/u/897369?v=3","gravatar_id":"","url":"https://api.github.com/users/valorin","html_url":"https://github.com/valorin","followers_url":"https://api.github.com/users/valorin/followers","following_url":"https://api.github.com/users/valorin/following{/other_user}","gists_url":"https://api.github.com/users/valorin/gists{/gist_id}","starred_url":"https://api.github.com/users/valorin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valorin/subscriptions","organizations_url":"https://api.github.com/users/valorin/orgs","repos_url":"https://api.github.com/users/valorin/repos","events_url":"https://api.github.com/users/valorin/events{/privacy}","received_events_url":"https://api.github.com/users/valorin/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T10:02:17Z","updated_at":"2015-09-30T10:02:17Z","body":"I think you're missing the point. You can't use the normal cache methods if you want to use tagging. For the sake of consistency, the events need to be fired regardless if it's tagged or not. It's a bug, not a feature."}}