You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that if I use NonValidatingImageCacheBackend then management commands ikcache* do exactly nothing to generate new files. It kind of makes sense, given the purpose of the backend, but in some cases I would like to invalidate and then force generate caches for this backend.
The text was updated successfully, but these errors were encountered:
I use the following management command to generate new files:
from django.core.management.base import BaseCommand
from galeria.models import Picture
class Command(BaseCommand):
help = "Generate thumbnails of galeria's pictures."
def handle(self, *args, **options):
for p in Picture.objects.public():
name = p.display_image.name
storage = p.display_image.source_file.storage
if name and not storage.exists(name):
p.display_image.generate(save=True)
p.thumbnail_image.generate(save=True)
p.cover_image.generate(save=True)
I think IK3 (now in the development branch) addresses this, so I'm going to close it. I realize that the NonValidatingImageCacheBackend ended up being kind of kludgy, but I think what you might be looking for is the --force-revalidation flag.
Hopefully IK3—which allows you to specify actions on particular events (source_changed, etc.)—will solve your problem more gracefully.
It seems that if I use
NonValidatingImageCacheBackend
then management commands ikcache* do exactly nothing to generate new files. It kind of makes sense, given the purpose of the backend, but in some cases I would like to invalidate and then force generate caches for this backend.The text was updated successfully, but these errors were encountered: