Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added ability to disable cache

  • Loading branch information...
commit cc63abf4891863a423cf44a96b14f1fb63ce9159 1 parent db0c9bc
@tthomas48 authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 BuyPlayTix/DataBean/DataBean.php
View
8 BuyPlayTix/DataBean/DataBean.php
@@ -2,6 +2,7 @@
namespace BuyPlayTix\DataBean;
class DataBean implements \Iterator
{
+ public static $CACHE = true;
private static $cache = Array();
/**
* associate array containing fields and values for this table
@@ -77,6 +78,9 @@ public static function getAdapter() {
}
private static function cache($object) {
+ if(!DataBean::$CACHE) {
+ return;
+ }
$pk = $object->pk;
if(!empty($object->$pk)) {
DataBean::$cache[$object->$pk] = $object;
@@ -90,6 +94,10 @@ private static function uncache($object) {
private static function load($pk) {
+ if(!DataBean::$CACHE) {
+ return false;
+ }
+
$pk = trim($pk);
if(empty($pk) || !array_key_exists($pk, DataBean::$cache)) {
return false;
Please sign in to comment.
Something went wrong with that request. Please try again.