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

Change page-cache location #74

Open
warmwhisky opened this issue Apr 12, 2021 · 2 comments
Open

Change page-cache location #74

warmwhisky opened this issue Apr 12, 2021 · 2 comments

Comments

@warmwhisky
Copy link

Is there a way to change the location of the page-cache? currently it sits in public, but I was hoping to put it on a completely different drive.

I tried changing the htaccess to point to a drive on windows to test it out before trying on Centos in production but it stopped caching when I done that.

Any ideas?

thanks

@omacranger
Copy link

In case others come across, this, yes, it can be done by throwing something like below in a boot method of one of your app service provider:

use Silber\PageCache\Cache;

...

public function boot()
{
    $this->app[Cache::class]->setCachePath(storage_path('/page-cache'));
}

Or any other path you would prefer in setCachePath.

@MarcosBL
Copy link

Thank you very much @omacranger !

I used your trick to specify different folders for a website accesed through multiple domains

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

3 participants