Skip to content

Instantly share code, notes, and snippets.

@rsanchez
Created November 14, 2011 20:46
Show Gist options
  • Save rsanchez/1365099 to your computer and use it in GitHub Desktop.
Save rsanchez/1365099 to your computer and use it in GitHub Desktop.
session->cache do something just once
public Your_extension_ext
{
public function your_hook()
{
if ( ! isset($this->EE->session->cache['your_extension]))
{
//do your stuff
}
//set the cache, so next time your stuff won't run
$this->EE->session->cache['your_extension'] = TRUE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment