Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class http_cache.store does not exist #30

Open
simplethemes opened this issue Feb 2, 2017 · 4 comments
Open

Class http_cache.store does not exist #30

simplethemes opened this issue Feb 2, 2017 · 4 comments

Comments

@simplethemes
Copy link

simplethemes commented Feb 2, 2017

I'm getting the following error when trying to purge a URI from cache in Laravel 5.4:

$url = url('properties', [$property_id]);
App::make('http_cache.store')->purge($url);

ReflectionException in Container.php line 681:
Class http_cache.store does not exist

Is this something on my end that I'm overlooking?

@roennow
Copy link
Contributor

roennow commented Mar 3, 2017

No I got it too but forgot to open an issue. I did this instead as a quick fix as a had to rush the update to 5.4

$dir = App::make('http_cache.cache_dir');
$httpcache = new Symfony\Component\HttpKernel\HttpCache\Store\Store($dir);
return $httpcache->purge($url);

@idealley
Copy link

idealley commented Mar 8, 2017

I have the same issue in Laravel 5.2 after update.

@idealley
Copy link

idealley commented Mar 8, 2017

To make it work with Laravel 5.2 I had to do the following:

        $dir = App::make('http_cache.cache_dir');
        $httpcache = new \Symfony\Component\HttpKernel\HttpCache\Store($dir);
        $cleaned = $httpcache->purge($url); //returns true/false

notice the path to the store class is slightly different

@okaufmann
Copy link
Contributor

I have the same issue.

Workaround works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants