mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Fix metadata cache
This commit is contained in:
@@ -408,6 +408,8 @@ class caption_Field_Value implements cache_cacheableInterface
|
|||||||
$record->get_caption()->delete_data_from_cache();
|
$record->get_caption()->delete_data_from_cache();
|
||||||
$databox_field->delete_data_from_cache();
|
$databox_field->delete_data_from_cache();
|
||||||
|
|
||||||
|
$caption_field_value->delete_data_from_cache();
|
||||||
|
|
||||||
return $caption_field_value;
|
return $caption_field_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -534,7 +536,7 @@ class caption_Field_Value implements cache_cacheableInterface
|
|||||||
*/
|
*/
|
||||||
public function get_cache_key($option = null)
|
public function get_cache_key($option = null)
|
||||||
{
|
{
|
||||||
return 'caption_fieldvalue_' . $this->id . '_' . $this->record->get_serialize_key() . ($option ? '_' . $option : '');
|
return 'caption_fieldvalue_' . $this->id . '_' . ($option ? '_' . $option : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -575,6 +577,12 @@ class caption_Field_Value implements cache_cacheableInterface
|
|||||||
{
|
{
|
||||||
$databox = $this->record->get_databox();
|
$databox = $this->record->get_databox();
|
||||||
$this->value = $this->VocabularyId = $this->VocabularyType = null;
|
$this->value = $this->VocabularyId = $this->VocabularyType = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
$this->record->get_caption()->get_field($this->databox_field->get_name())->delete_data_from_cache();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return $databox->delete_data_from_cache($this->get_cache_key($option));
|
return $databox->delete_data_from_cache($this->get_cache_key($option));
|
||||||
}
|
}
|
||||||
|
@@ -463,7 +463,7 @@ class caption_field implements cache_cacheableInterface
|
|||||||
*/
|
*/
|
||||||
public function get_cache_key($option = null)
|
public function get_cache_key($option = null)
|
||||||
{
|
{
|
||||||
return 'caption_field_' . $this->record->get_serialize_key() . ($option ? '_' . $option : '');
|
return 'caption_field_' . $this->databox_field->get_id() . '_' . $this->record->get_serialize_key() . ($option ? '_' . $option : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user