简体   繁体   中英

Diskcache metadata on cached files for file compression

I want to implement a background image compressor to my cached files. To do that I need to know what id (or filepath) the cached file belongs to, so I can do some cache cleaning after it has finished compressing the files. The plan was to start this compressing after upload (and after generating the most used versions of the file (like standard widths for the srcset)).

One way would be to save a id to the file (or filename/path) in some metadata, but the cached files doesnt include any meta data.

what is the best way to do something like this?

If there is a better way to optimize the images please let me know. But we do need to compress them as there is a lot of clients referring to a bad google score, since our images are too big.

I would suggest switching to our newer product, Imageflow.NET Server , as it compresses images much, much better and does so in less time. It should eliminate the need for a background image compressor. It has a drop-in compatible URL syntax.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM