mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-16 21:30:23 +00:00
Store state when force-generated
This commit is contained in:
parent
c48c720f8a
commit
70ff6dc788
1 changed files with 1 additions and 0 deletions
|
|
@ -68,6 +68,7 @@ class CachedFileBackend(object):
|
|||
def generate(self, file, force=False):
|
||||
if force:
|
||||
file._generate()
|
||||
self.set_state(file, CacheFileState.EXISTS)
|
||||
elif self.get_state(file) is CacheFileState.DOES_NOT_EXIST:
|
||||
# Don't generate if the file exists or is pending.
|
||||
self._generate(file)
|
||||
|
|
|
|||
Loading…
Reference in a new issue