PHP Class RedUNIT\Base\Writecache

The Query Writer Cache tries to avoid unnecessary queries by using cache markers. This means repeatingly fetching the same parent bean for instance (in loop) won't hurt performance. The Query Writer Cache gets emptied if the chain of markers gets broken. All 'non destructive' queries are marked, as long as no other queries have been executed we can safely assume nothing in the database has changed for the current request. You might want to turn this form of caching off in long running PHP processes.
Author: Gabor de Mooij and the RedBeanPHP Community
Inheritance: extends RedUNIT\Base
Show file Open project: gabordemooij/redbean

Public Methods

Method Description
getTargetDrivers ( ) What drivers should be loaded for this test pack?
testCacheSize ( ) : void Test whether cache size remains constant (per type).
testCachingAndFetchAs ( ) When using fetchAs(), Query Cache does not recognize objects that have been previously fetched, see issue #400.
testCachingEffects ( ) : void Test effects of cache.
testConfusionRegression ( ) : void Can we confuse the cache?
testExplicitCacheFlush ( ) : void Test explicit flush.
testGhostBeans ( ) : void Test Ghost beans.
testInstructNoDrop ( ) : void Same as above.
testKeepCacheCommentInSQL ( ) : void Test keep-cache comment.
testRegressions ( ) : void Try to fool the cache :)

Method Details

getTargetDrivers() public method

What drivers should be loaded for this test pack?
public getTargetDrivers ( )

testCacheSize() public method

Avoiding potential memory leaks. (Issue #424).
public testCacheSize ( ) : void
return void

testCachingAndFetchAs() public method

When using fetchAs(), Query Cache does not recognize objects that have been previously fetched, see issue #400.

testCachingEffects() public method

Test effects of cache.
public testCachingEffects ( ) : void
return void

testConfusionRegression() public method

Can we confuse the cache?
public testConfusionRegression ( ) : void
return void

testExplicitCacheFlush() public method

Test explicit flush.
public testExplicitCacheFlush ( ) : void
return void

testGhostBeans() public method

...
public testGhostBeans ( ) : void
return void

testInstructNoDrop() public method

. test keep cache.
public testInstructNoDrop ( ) : void
return void

testKeepCacheCommentInSQL() public method

Test keep-cache comment.
public testKeepCacheCommentInSQL ( ) : void
return void

testRegressions() public method

Try to fool the cache :)
public testRegressions ( ) : void
return void