Posted by crea on October 31, 2009 at 9:40pm
Jump to:
| Project: | Token |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
So as it seems now token flushing in case of problems becomes commonly accepted practice, would be nice to have per-token cache so if module wanted to clear only some tokens, entire cache wouldn't be lost. It seems now too many modules may clear entire token cache, rendering it useless in many cases.
Comments
#1
Anyone ? We are now using very inefficient practice of flushing entire cache. For example of inefficiency see #529186: Usage of global token breaks default page titles because of early Token caching
#2
Subscribing.
#3
Suscribing too, problems with the pagin and tokens in www.amarilysfloreria.com
#4
Subscribing.
#5
It seems still not solved in "6.x-1.18".
In function token_get_values() :
<?php// Flush the static token cache. Useful for processes that need to slog
// through huge numbers of tokens in a single execution cycle. Flushing it
// will keep them from burning through memory.
if ($flush || !empty($options['reset'])) {
$tokens = array();
}
?>
Why not this way ?:
<?phpif ($flush || !empty($options['reset'])) {
$tokens[$type] = array();
}
?>
For example, now page_title_page_get_title() clears all 'node' tokens. But need only 'global' :(