JosephSilber / page-cache

Caches responses as static files on disk for lightning fast page loads.
MIT License
1.21k stars 118 forks source link

Homepage cache is generated on every request #93

Open kriosmane opened 2 years ago

kriosmane commented 2 years ago

Hi,

I'm developing a website using Twill and I'm using this package to cache the pages and it actually works really fine, my only problem is that the homepage is cached in every request (pcindexpc.html).

I've chosen to specify which URL I want to cache so I can avoid the backed to be cached

this is working pretty well:

Route::middleware('page-cache')->name('page.show')->get('{slug}', 'App\Http\Controllers\PageController@show');

but for the homepage is not working as it should, the cache is generated on every request

Route::middleware('page-cache')->name('homepage.show')->get('/', 'App\Http\Controllers\HomePageController@show');

The application is served with Nginx

Do you have any idea on how to fix that?