public function testCacheDelete() { $this->setData(100, "foo"); $query = DataCacheBehaviorMemcachedTestQuery::create(); $query->findOneById(100); $cacheKey = $query->getCacheKey(); DataCacheBehaviorMemcachedTestPeer::cacheDelete($query->getCacheKey()); $result = Domino\CacheStore\Factory::factory("memcached")->get("data_cache_behavior_memcached_test", $cacheKey); $this->assertNull($result); }
public function testDeleteFromCache() { $this->setData(100, "foo"); $this->setData(200, "bar"); $foo = DataCacheBehaviorMemcachedTestQuery::create(); $foo->findOneById(100); $fooKey = $foo->getCacheKey(); $bar = DataCacheBehaviorMemcachedTestQuery::create(); $barObj = $bar->findOneById(200); $barKey = $bar->getCacheKey(); $foo->deleteFromCache(); $fooCache = Domino\CacheStore\Factory::factory("memcached")->get("data_cache_behavior_memcached_test", $fooKey); $this->assertNull($fooCache); $barCache = Domino\CacheStore\Factory::factory("memcached")->get("data_cache_behavior_memcached_test", $barKey); $this->assertEquals($barObj, $barCache); }