ImageResizer: delete cached image (Diskcache and SqlReader)

Use ImageResizerto resize user uploaded files on the fly.

When a file is deleted in the database (the row is deleted), both the original and modified versions are still available for some time until the cleanup schedule is completed.

In the case of copyright, porn, etc., is there a way to let DiskCacheme know that the file was deleted and force the file to be deleted from the cache right away?

I think this can be solved with IVirtualFileWithModifiedDate, but was it not necessary to request db for each request, and not just process it during deletion?

A bit like:

DAL.DeleteImage(ImageID);

DiskCachePlugin.Invalidate(ImageID);
+4
source share
1

( ), , , .

ImageResizer , , . , (, Sql S3) (, Sql S3) ( 1 ), , . V4 , .

+1

All Articles