jlengstorf / netlify-plugin-gatsby-cache

185 stars 21 forks source link

auto-delete old cache or store /public/static instead of all public #31

Closed PetroPavlenko closed 4 years ago

PetroPavlenko commented 4 years ago

This is close to other repo issue But when I tried to delete page(build it locally or in netlify). I couldn't. There was nothing about that in sitemap. But it was in public/page-data.

So, please use public/static instead of public folder

jlengstorf commented 4 years ago

hey, @PetroPavlenko! if you want to delete the cache, use the "Clear cache & deploy" button in the Netlify UI — we want to keep more than just the public/static folder around between builds in most cases to keep build times low

I'm going to close this, but please feel free to follow up with any additional questions!

quantizor commented 4 years ago

I think there is a problem here though with the caching logic. I added this plugin to our Netlify setup and the cache grows at a rate of 0.5GB per week with 3-4 developers making a few PRs a day. The old builds don't seem to be pruned correctly.

jlengstorf commented 4 years ago

@probablyup it's hard to say without a full analysis, but this sounds like an upstream issue. all this plugin does is move the folders Gatsby creates, so any changes/additions come from Gatsby itself

quantizor commented 4 years ago

@jlengstorf yeah I think you're right, thanks for the explanation