Created
November 14, 2011 20:46
-
-
Save rsanchez/1365099 to your computer and use it in GitHub Desktop.
session->cache do something just once
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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