diff options
Diffstat (limited to 'framework/Data')
-rw-r--r-- | framework/Data/TMemCache.php | 1 | ||||
-rw-r--r-- | framework/Data/TSqliteCache.php | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/framework/Data/TMemCache.php b/framework/Data/TMemCache.php index 73eec99f..4d952551 100644 --- a/framework/Data/TMemCache.php +++ b/framework/Data/TMemCache.php @@ -111,6 +111,7 @@ class TMemCache extends TComponent implements IModule, ICache if($application instanceof IApplication)
$this->_prefix=$application->getUniqueID();
$this->_initialized=true;
+ $application->setCache($this);
}
/**
diff --git a/framework/Data/TSqliteCache.php b/framework/Data/TSqliteCache.php index 8d59b035..f589f93d 100644 --- a/framework/Data/TSqliteCache.php +++ b/framework/Data/TSqliteCache.php @@ -129,8 +129,9 @@ class TSqliteCache extends TComponent implements IModule, ICache }
else
throw new TConfigurationException('sqlitecache_table_creation_failed',sqlite_error_string(sqlite_last_error()));
- $this->_initialized=true;
$this->_db->query('DELETE FROM '.self::CACHE_TABLE.' WHERE expire<>0 AND expire<'.time());
+ $this->_initialized=true;
+ $application->setCache($this);
}
/**
|