Closed
Description
I'm having a closer look at the implementation of AbstractTagAwareAdapter
. Here are some notes for discussion (/cc @andrerom as the original author):
deleteItems()
callsdoFetch()
to get access to the tags stored next to an item. Because the values are stored as['value' => $item->value, 'tags' => [...]]
, it means the value is actually unserialized when only the tags are needed. This can be problematic (perf-wise at least).
That's the reason whyTagAwareAdapter
stores them under separate keys in the storage. Can we do the same here?doClear($namespace)
doesn't clear the tags related to the items found in the namespace when one is provided. ForFilesystemTagAwareAdapter
that looks fixable. ForRedisTagAwareAdapter
I'm not sure how involving it could be. We could also consider this not worth fixing: the only side effect is that a value might be invalidated while it shouldn't (because it doesn't have the tag anymore).- why use symlinks in
FilesystemTagAwareAdapter
instead of a single file that lists all item files? Using files would allow fixingdoInvalidate
, which leaks inodes right now.