You are here

function form_builder_cache_purge in Form Builder 6

Same name and namespace in other branches
  1. 7.2 includes/form_builder.cache.inc \form_builder_cache_purge()
  2. 7 includes/form_builder.cache.inc \form_builder_cache_purge()

Delete outdated cache entries.

Parameters

$expire_threshold: The maximum amount of time allowed for entries to be kept, in seconds.

File

includes/form_builder.cache.inc, line 70
form_builder.cache.inc Functions for temporary storage of form builder structures while editing.

Code

function form_builder_cache_purge($expire_threshold = NULL) {
  $expire_threshold = isset($expire_threshold) ? $expire_threshold : ini_get('session.cache_expire');
  return db_query("DELETE FROM {form_builder_cache} WHERE updated < %d", time() - $expire_threshold);
}