Closed (won't fix)
Project:
Token
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2023 at 07:30 UTC
Updated:
24 Apr 2024 at 19:24 UTC
Jump to comment: Most recent
The Tokens module stores cache in the cache_data bin, which is also utilized by many other modules. Currently, my site has 13 token cache items, while the cache_data bin contains 32,000+ items. Consequently, I need to transfer the tokens cache to the database.
I believe that implementing a separate cache bin for tokens would provide the capability to override the cache location without modifying the remaining 32,000+ items.
N/A
N/A
N/A
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
abu-zakham commentedComment #3
abu-zakham commentedComment #4
abu-zakham commentedComment #6
berdirUsing custom module cache bins is discouraged, I don't understand why this is needed. There are only few token cache bins but they can be very large, so it's not a good fit for something like cache_bootstrap.
Comment #7
abu-zakham commentedCustom bins allow for fine-grained control over caching for a module's data, ensuring optimal performance and minimal cache conflicts.
Benefits of custom cache bins include isolation, allowing for the separation of cached data related to a module from other modules, and control over how data is cached, retrieved, and invalidated. Custom cache bins also allow for optimization of caching for a module's specific use cases, improving performance.
When implementing a custom cache bin, it's important to consider factors such as cache granularity, data validity, and cache-clearing strategies. Custom cache bins are a powerful tool for fine-tuning caching mechanisms in Drupal.
Comment #9
berdir#7 sounds like a ChatGPT explanation to me.
There is no need to have a cache bin for every little bin, Drupal 8+ optimized for fewer, semantic cache bins instead of basically having one for every module.
Also, this is just the tree cache, which is only used when displaying token UI, the actual tokens are cached in cache_default and that's defined in core.