Skip to content

Instantly share code, notes, and snippets.

@og-shawn-crigger
Created July 24, 2012 14:40
Show Gist options
  • Select an option

  • Save og-shawn-crigger/3170309 to your computer and use it in GitHub Desktop.

Select an option

Save og-shawn-crigger/3170309 to your computer and use it in GitHub Desktop.
Bonfire Assets Clear Cache

Simple Method I use to Clear Assets Cache while Developing Bonfire Sites

This is just a silly method I use a lot for my sites, I always add the debug flags and instead of having to rm -rf cache/*

I can just flip the switch and have Bonfire clear its own cache like a boss playa….

For more Bonfire and CodeIgniter Adventures of the 6th kynd keep on trucking….

/**
* @var bool Setting flag to turn on Debug mode.
*/
protected $_debug = FALSE;
/**
* Constructor fixes Flux Capicitors
*/
public function __construct()
{
parent::__construct();
$this->benchmark->mark('construct_start');
if ($this->_debug)
{
Assets::clear_cache();
}
$this->benchmark->mark('construct_end');
}//end __construct();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment