11ty/eleventy-fetch

Human readable cache file names

nchan0154 opened this issue · 2 comments

Thanks for this plugin, I use it -a LOT-. One thing I loved about eleventy-cache-assets is that the filename represented the cache name, so if I needed to edit a particular file to mock some data, it would be easy to locate it. I often do things like change properties on my object responses to test different states, copy and paste a bunch of items to show how pagination would look, etc. Will there ever be an option to generate human readable names for the cache files?

This used to be possible, but the change in this commit forced all the uniqueKey values to be hashed.

It shouldn't be too hard to add an option to bring back a non-hashed file name. @zachleat is that something you'd consider bringing back through an option on AssetCache?

It's definitely a feature I miss also.

I think a callback that allows you to add your own hashing function would be nice! I’m open to a PR for this!