From 30ce6a05320a501073da3224a54bfd27b32c761a Mon Sep 17 00:00:00 2001 From: alanmackenzie Date: Fri, 15 Nov 2013 17:51:21 +0000 Subject: [PATCH] Issue #2086633 by alanmackenzie: Allow for the clearing of individual entitycache caches via drush cc. --- entitycache.drush.inc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 entitycache.drush.inc diff --git a/entitycache.drush.inc b/entitycache.drush.inc new file mode 100644 index 0000000..1bd593d --- /dev/null +++ b/entitycache.drush.inc @@ -0,0 +1,21 @@ + $info) { + if (isset($info['entity cache']) && $info['entity cache']) { + // You can't pass paramters to the callbacks in $types, so create an + // anonymous function for each specific bin. + $lamdba = create_function('', "return cache_clear_all('*', 'cache_entity_" . $type . "', TRUE);"); + $types['entitycache-' . str_replace('_', '-', $type)] = $lamdba; + } + } +} -- 1.7.9.5