Closed (fixed)
Project:
Cache Actions
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2012 at 11:31 UTC
Updated:
30 Mar 2012 at 13:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
fabsor commentedHere is a quite big patch that addresses the problem.
* The cache plugin will automaticly create a cache id for each pane you set it on.
* There is an advanced fieldset that let's you set the cache key yourself
* I added substitutions that can be used by advanced users. This won't work with the regular pane cache invalidation rule though, so I strip those away from the administration of that action.
* I added some code that will automaticly update the name of the cache key in rules that contains them. It runs after a panel has been saved.
* I added an upgrade path. I don't know if it makes sense to have that or not.
Comment #2
das-peter commentedI'm all for it. :)
To provide a default but allow users to change it is really a nice way to support simple as well as complex scenarios at the same time.
Comment #3
das-peter commentedI'll give this a shot now.
I've re-rolled the patch to clean up a few coding standards issues.
Comment #4
das-peter commentedLooks good so far.
I've made some small changes:
cache_actions_update_7201():Ensure the loop acts only on
RulesAction.RulesLoopdoesn't have a->getElementName()and will throw an error.Manually trigger
cache_actions_panels_display_save()since we can't be sure that the hook is already registered at the time to update runs.panels_get_pane_title()byctools_content_admin_title()cache_actions_rules_cache_settings_form_validate: added check to ensure$pane->cache['method']exists before accessing it.Tests on developer stage were promising. Tests on test stage will begin shortly.
Comment #5
das-peter commentedNext update :)
'cache_actions_' . $display->cache_keyreplaced bycache_actions_updated_panesand usage of sub-array in it. That way the module doesn't create a random variable.$key = 'task:' . $handler->name . ':' . $handler->task;in_cache_actions_get_panels_handlerswas on the wrong location - I guess...$form['display_cache_key']in the pane cache settings.Comment #6
das-peter commentedOuch, I should commit before I create a patch...
Comment #7
fabsor commentedThis patch needs a reroll:
* It accidently removes stuff in the .install file that I really think should be there.* #1425936: Store the detected cache bins to avoid invoking hook_flush_caches() multiple times. is fixed, so this breaks the patch right now.
Comment #8
das-peter commentedThanks for committing the other patch :)
Re-rolled patch against latest dev.
Comment #9
das-peter commentedOh, and I think it could use a review..
Comment #10
fabsor commentedThere were issues with custom pages, some old code appended the task and plugin name. This patch fixes that issue.
Comment #11
das-peter commentedAh I already thought, something with the
$keyis weird ;)Comment #12
fabsor commentedAlright, this has been here long enough. I'm commiting this, since this is actually not broken as opposed to what we have, and it's a really great improvement.
Comment #13
das-peter commented*yay* thanks :)