prerender-alpine icon indicating copy to clipboard operation
prerender-alpine copied to clipboard

api?

Open 9mm opened this issue 3 years ago • 1 comments

Hey, this is awesome. Thanks for making this docker image, the others seem to be so out of date.

Is there some ability with your image to selectively clear items out of the cache?

I was considering that this would work quite good if i just set very long cache (months) and manually clear it via api call when updating a record

Nice work, and thank you

9mm avatar Apr 12 '23 05:04 9mm

Hey @9mm,

Thank you for your feedback.

The Prerender In-Memory Cache currently plugin doesn't have an API available to clear items out of the cache.

The code of the cache plugin is quite straightforward: https://github.com/prerender/prerender-memory-cache/blob/master/index.js It should be possible to write this by yourself if you need to have this functionality.

For this docker image, server.js can be modified by writing your own server.js and mounting this file as a docker volume:

docker run -p 3000:3000 -v $(pwd)/server.js:/home/node/server.js tvanro/prerender-alpine:6.5.0 

It would indeed be a good idea to have an API like this available! Good luck!

tvanro avatar Apr 22 '23 14:04 tvanro