netlify-plugin-cloudinary icon indicating copy to clipboard operation
netlify-plugin-cloudinary copied to clipboard

[Feature] Cache plugin state for processing images

Open colbyfayock opened this issue 2 years ago • 0 comments

Feature Request

Is your feature request related to a problem? Please describe.

We can take advantage of the Netlify cache utilities to save the recorded state of assets.

This includes keeping records of what images are uploaded as well as things like what upload preset was used (if any) so that we can force re-process all images with the new upload preset if set.

We're currently storing

Describe the solution you'd like

We're currently storing asset state in the following internally accessible object:

https://github.com/colbyfayock/netlify-plugin-cloudinary/blob/main/src/index.js#L22

We may be able to latch on to this for storing the results.

Netlify has a cache util that would allow us to easily store these details:

https://github.com/netlify/build/blob/main/packages/cache-utils/README.md

colbyfayock avatar Oct 17 '22 17:10 colbyfayock