Add a uniqueness hash to derived image storage to break caching over tags
This allows converted ACIs and squashed images to be unique based on the specified tag. Fixes #92
This commit is contained in:
parent
a33a70a419
commit
a43b741f1b
7 changed files with 119 additions and 40 deletions
|
@ -617,12 +617,13 @@ class DerivedStorageForImage(BaseModel):
|
|||
source_image = ForeignKeyField(Image)
|
||||
derivative = ForeignKeyField(ImageStorage)
|
||||
transformation = ForeignKeyField(ImageStorageTransformation)
|
||||
uniqueness_hash = CharField(null=True)
|
||||
|
||||
class Meta:
|
||||
database = db
|
||||
read_slaves = (read_slave,)
|
||||
indexes = (
|
||||
(('source_image', 'transformation'), True),
|
||||
(('source_image', 'transformation', 'uniqueness_hash'), True),
|
||||
)
|
||||
|
||||
|
||||
|
|
Reference in a new issue