*/
protected function getCacheKeyByCriteria (Criteria $criteriaInstance, array $onlyKeys = array()) {
// Generate it
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FRAMEWORK-SYSTEM: criteriaInstance=' . $criteriaInstance->__toString() . ',onlyKeys()=' . count($onlyKeys) . ' - CALLED!');
$cacheKey = sprintf('%s@%s',
$this->__toString(),
$criteriaInstance->getCacheKey($onlyKeys)
);
// And return it
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($this->__toString() . ': cacheKey=' . $cacheKey);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FRAMEWORK-SYSTEM: cacheKey=' . $cacheKey . ' - EXIT!');
return $cacheKey;
}
// Serialize and compress it
$compressedData = $this->getCompressorChannel()->getCompressor()->compressStream(json_encode($dataArray));
- // Write data
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: Writing ' . strlen($compressedData) . ' bytes ...');
-
// Write this data BASE64 encoded to the file
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: Writing ' . strlen($compressedData) . ' bytes ...');
$this->getFileIoInstance()->saveStreamToFile($infoInstance, $compressedData, $this);
// Debug message
*/
public function queryInsertDataSet (StoreableCriteria $dataSetInstance) {
// Try to save the request away
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('DATABASE: dataSetInstance=%s - CALLED!', $dataSetInstance->__toString()));
try {
// Create full path name
$infoInstance = $this->generateFileFromDataSet($dataSetInstance, md5($dataSetInstance->getUniqueValue()));
self::EXCEPTION_SQL_QUERY
);
}
+
+ // Trace message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: EXIT!');
}
/**
*/
protected function queryInsertDataSet (StoreableCriteria $dataSetInstance, array $onlyKeys = array()) {
// Default cache key is NULL
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: dataSetInstance=%s,onlyKeys()=%d - CALLED!', $dataSetInstance->__toString(), count($onlyKeys)));
$cacheKey = NULL;
// Is cache enabled?
} // END - if
// Does this key exists in cache?
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: cacheKey[%s]=%s', gettype($cacheKey), $cacheKey));
if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->cacheInstance->offsetExists($cacheKey))) {
// Purge the cache
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: Calling this->cacheInstance->purgeOffset(%s) ...', $cacheKey));
$this->cacheInstance->purgeOffset($cacheKey);
} // END - if
// Handle it over to the middleware
FrameworkBootstrap::getDatabaseInstance()->queryInsertDataSet($dataSetInstance);
+
+ // Trace message
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: EXIT!');
}
/**