GetBoxCacheFilter

This method creates a cache filter that can be used to operate on a cache instance and its keys.

The filter can be used to clear, get, or remove keys from the cache.

All filters must be adhere to the ,{@link ICacheKeyFilter}, interface.

Example:

,

,
getBoxCache().clear( getBoxCacheFilter( "foo*" ) );
getBoxCache().clear( getBoxCacheFilter( ".foo.", true ) );
You can also create your own custom cache filter by using a closure/lambda that
accepts a ,{@code
Key
}, and returns a boolean.
Example:
,,getBoxCache().clear( key -> key.getName().startsWith( "foo" ) );getBoxCache().clear( key -> key.getName().matches( ".foo." ) );,
Method Signature
GetBoxCacheFilter(filter=[string], useRegex=[boolean])
Arguments



























Examples
Related




Last updated

Logo

Copyright & Register Trademark by Ortus Solutions, Corp & Ortus Software, LLC