Add exists method to cache file model
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -210,6 +210,9 @@ class CachePartitionFile(models.Model):
|
|||||||
self.partition.cache.storage.delete(name=self.full_filename)
|
self.partition.cache.storage.delete(name=self.full_filename)
|
||||||
return super(CachePartitionFile, self).delete(*args, **kwargs)
|
return super(CachePartitionFile, self).delete(*args, **kwargs)
|
||||||
|
|
||||||
|
def exists(self):
|
||||||
|
return self.partition.cache.storage.exists(name=self.full_filename)
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def full_filename(self):
|
def full_filename(self):
|
||||||
return CachePartition.get_combined_filename(
|
return CachePartition.get_combined_filename(
|
||||||
|
|||||||
Reference in New Issue
Block a user