ezsystems/ezpublish-kernel
eZ Publish Kernel is the core of the eZ Publish/eZ Platform CMS, providing the content repository, field types, search integration, and services for building and extending PHP-based content applications with a modular, API-driven architecture.
Persistence cache refers to a decorator implementation of eZ\Publish\SPI\Persistence that only caches data to reduce
lockups to underlying persisted storage engine. Implementation can be found in eZ\Publish\Core\Persistence\Cache.
As of kernel 7.0 the cache pool used internally is Symfony cache. And for the most part we use it as an implementation
of PSR-6. However as we have more advance needs for cache invalidation we specify that we require implementation of
Symfony\Component\Cache\Adapter\TagAwareAdapterInterface, as we take advantage of Cache tagging.
Tags are set when a cache item is saved, and used by any code that needs to invalidate a specif part of the cache. You can think of it as a additional index for the cache item that you may invalidate it by, allowing you to index the cache in a ways so exact items are invalidated on specific bulk operations affecting a sub set of the cache pool.
List of tags and their meaning:
c-<content-id> :
Meta tag used on anything that are affected on changes to content, on content itself as well as location and so on.
c-<content-id>-v-<version-number>
Used for specific versions, usuefull for clearing cache of a specific draft on changes for instance.
cft-<content-type-id> :
Used on content/user object itself (with fields), for use when operations affect content type or its content fields.
l-<location-id> :
Meta tag used on anything that are affected on changes to location, needs to be invalidated if location changes.
lp-<location-id> :
Same as above, additional tags for all parents, for operations that changes the tree itself, like move/remove/(..).
la-<language-id> :
Used on languages, and invalidated when operations affect a language.
t-<type-id> :
Used on types, and invalidated when operations affect a type.
tg-<type-group-id> :
Used on type groups, and invalidated when operations affect a type groups.
tm :
Used on type map info, like calculated info on searchable fields, invalidated on type changes.
s-<type-id> :
Used on states, and invalidated when operations affect a state.
sg-<state-group-id> :
Used on state groups, and invalidated when operations affect a state groups.
se-<section-id> :
Used on sections, and invalidated when operations affect a section.
urlal-<location-id> :
Used on url alias, invalidated on location operations affecting url alias.
urlanf :
Used for not found lookups for url alias by url as this is hot spot, invalidated on urlAlias creation.
r-<role-id> :
Used on roles, and invalidated when operations affect a role (role and policy operations).
p-<policy-id> :
Used on policies, and invalidated when operations affect a policy.
ra-<role-assignment-id> :
Used on role assignment, and invalidated when operations affect a role assignment.
ragl-<content-id> :
Used for list of role assignment, and invalidated when operations affect it from content side.
rarl-<content-id> :
Used for list of role assignment, and invalidated when operations affect it from role side.
On LocationHandler->create() the following invalidation is done:
$this->cache->invalidateTags(['c-' . $locationStruct->contentId, 'ragl-' . $locationStruct->contentId]);
This is done since the operation might affect content if main location changes, and as it might affect roles assignments on the given that are connected to the given content (as in user might get additional roles when new location is added for user).
How can I help you explore Laravel packages today?