You are here

function entityconnect_cache_set in Entity connect 7

Same name and namespace in other branches
  1. 7.2 entityconnect.module \entityconnect_cache_set()

Wraps cache set.

We can set the expire easily if needed.

2 calls to entityconnect_cache_set()
entityconnect_add_edit_button_submit in includes/entityconnect.form.inc
Call when a new entity is to be added or edited.
entityconnect_child_form_submit in includes/entityconnect.form.inc
Sets submit button on child create form.

File

./entityconnect.module, line 133
Handles the main hooks used by entityconnect.

Code

function entityconnect_cache_set($cid, $data) {

  // Get cache_lifetime variable.
  $cache_lifetime = variable_get('entityconnect_cache_lifetime', CACHE_PERMANENT);
  if ($cache_lifetime !== CACHE_PERMANENT) {
    $cache_lifetime = REQUEST_TIME + $cache_lifetime;
  }
  return cache_set($cid, $data, ENTITYCONNECT_CACHE_TABLE, $cache_lifetime);
}