Builder::generate_cache_key( TECEventsCustom_TablesV1ModelsModel $model, string $field, mixed $value )
Generates a cache key for this particular model instance.
Contents
Parameters
- $model
-
(TECEventsCustom_TablesV1ModelsModel) (Required) The instance we are generating a cache key for.
- $field
-
(string) (Required) The field we are searching / caching by.
- $value
-
(mixed) (Required) The value we are searching / caching with.
Return
(string)
Source
File: src/Events/Custom_Tables/V1/Models/Builder.php
public static function generate_cache_key( Model $model, $field, $value ): string {
$value = ! is_string( $value ) ? serialize( $value ) : $value;
return $field . $value . get_class( $model );
}
Changelog
| Version | Description |
|---|---|
| 6.1.3 | Introduced. |