Skip to content

Instantly share code, notes, and snippets.

@averyaube
Created June 22, 2011 16:46
Show Gist options
  • Save averyaube/1040520 to your computer and use it in GitHub Desktop.
Save averyaube/1040520 to your computer and use it in GitHub Desktop.
Null Kohana Cache
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Just stores nothing, gets nothing. Useful for development
*
* @author Lowgain
*/
class Cache_Null extends Cache {
public function get($id, $default = NULL)
{
return $default;
}
public function set($id, $data, $lifetime = NULL)
{
return TRUE;
}
public function delete($id)
{
return TRUE;
}
public function delete_all()
{
return TRUE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment