1
0
mirror of synced 2025-01-31 04:21:44 +03:00

Fix TIP and show new cache instropection API (2.2)

This commit is contained in:
Benjamin Eberlei 2012-01-09 08:37:12 +01:00
parent ce0873d589
commit 1d5597917b

View File

@ -1187,7 +1187,15 @@ Result Cache API:
$query->useResultCache(true, $seconds = 3600, 'my_query_result');
$result = $query->getResult(); // cache hit!
**TIP!** You can set the Result Cache Driver globally on the
// Introspection
$queryCacheProfile = $query->getQueryCacheProfile();
$cacheDriver = $query->getResultCacheDriver();
$lifetime = $query->getLifetime();
$key = $query->getCacheKey();
.. note::
You can set the Result Cache Driver globally on the
``Doctrine\ORM\Configuration`` instance so that it is passed to
every ``Query`` and ``NativeQuery`` instance.