Skip to content

Instantly share code, notes, and snippets.

@rynop
Created December 10, 2010 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rynop/736653 to your computer and use it in GitHub Desktop.
Save rynop/736653 to your computer and use it in GitHub Desktop.
add FormHelper support to url_cache
32,33c32,39
< $this->_key = 'url_map' . $this->_key;
< $this->_cache = Cache::read($this->_key, '_cake_core_');
---
> if (is_a($this, 'HtmlHelper')) {
> $this->_key = 'url_map_html' . $this->_key;
> $this->_cache = Cache::read($this->_key, '_cake_core_');
> }
> elseif (is_a($this, 'FormHelper')){
> $this->_key = 'url_map_form' . $this->_key;
> $this->_cache = Cache::read($this->_key, '_cake_core_');
> }
41c47
< if (is_a($this, 'HtmlHelper')) {
---
> if (!empty($this->_cache) && (is_a($this, 'HtmlHelper') || is_a($this, 'FormHelper'))) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment