matthewwithanm / django-imagekit

Automated image processing for Django. Currently v4.0
http://django-imagekit.rtfd.org/
BSD 3-Clause "New" or "Revised" License
2.26k stars 276 forks source link

Create clearimagescache.py #458

Closed vzagorovskiy closed 6 years ago

vzagorovskiy commented 6 years ago

Please add command to clear images cache

vstoykov commented 6 years ago

For the Django cache I'm normally using clear_cache from django-extensions (Sadly there is no documentation. You can look the code https://github.com/django-extensions/django-extensions/blob/master/django_extensions/management/commands/clear_cache.py)

Probably if we implement "clear images cache" command it should also delete cached images in the storage and not only cached information about the existence of these files. If we only clear the django cache (which by default is the default django cache) some of the people can be confused that images are not deleted.

Currently I'm +-0 about this PR. If there are other people voting for this to be merged I will merge it. If you or someone else is willing to improve the command to also (optionally) clear cached images then I'll be +1 on this.

vzagorovskiy commented 6 years ago

It's good idea. I will try to realize deleting image from storage. Thank you.