我試圖建立學說sqlite的緩存Symfony的1.4與下面的代碼:如何檢查Doctrine 1.2 sqlite緩存是否工作?
$cacheConn = Doctrine_Manager::connection(new PDO('sqlite::memory:'));
$cacheDriver = new Doctrine_Cache_Db(array('connection' => $cacheConn, 'tableName' => 'cache'));
$cacheDriver->createTable();
$manager->setAttribute(Doctrine_Core::ATTR_QUERY_CACHE, $cacheDriver);
$manager->setAttribute(Doctrine_Core::ATTR_RESULT_CACHE, $cacheDriver);
$manager->setAttribute(Doctrine_Core::ATTR_CACHE_LIFESPAN, 60 * 5);
$manager->setAttribute(Doctrine_Core::ATTR_RESULT_CACHE_LIFESPAN, 60 * 5);
我沒有看到任何錯誤,但腳本執行時間保持完全一樣,沒有緩存。如何檢查緩存實際上工作?
1爲援引源。 – 2013-04-26 09:00:30