diff --git a/entityconnect.module b/entityconnect.module index c832278..b2d593d 100644 --- a/entityconnect.module +++ b/entityconnect.module @@ -131,7 +131,8 @@ function entityconnect_include_form() { * We can set the expire easily if needed. */ function entityconnect_cache_set($cid, $data) { - return cache_set($cid, $data, ENTITYCONNECT_CACHE_TABLE, CACHE_PERMANENT); + // Expire after 6 hours + return cache_set($cid, $data, ENTITYCONNECT_CACHE_TABLE, REQUEST_TIME + 21600); } /** @@ -142,6 +143,13 @@ function entityconnect_cache_get($cid) { } /** + * Implements hook_flush_caches(). + */ +function entityconnect_flush_caches() { + return array('cache_entityconnect'); +} + +/** * Implements hook_form_alter(). * * If we are adding a new entity we pass of to entityconnect_add_form_alter