ORMEvictQueries()
Evicts all queries from the named query cache. If cacheName is not specified, evicts the default query cache.
Requires Extension: Hibernate ORM Engine Extension
ORMEvictQueries( cacheName=String, datasource=string );
Returns: void
| Argument | Description |
|---|---|
|
cacheName
String,
optional
|
edit
Name of the cache region that you want to evict Alias: cache, region |
|
datasource
string,
optional
|
edit
datasource used for the session, if nor defined the datasource defined in application.cfc/cfapplication is used. |
Usage Notes
editEvicts cached query results from the second-level query cache. If cacheName is provided, only that named cache region is evicted. Otherwise the default query cache is evicted.
Only relevant when secondaryCacheEnabled is true and queries are run with cacheable: true.
See ORM - Caching for query cache details.
Examples
edit// Evict all cached queries in the default region
ORMEvictQueries();
// Evict a named cache region
ORMEvictQueries( "activeProducts" );
// Evict queries for a specific datasource
ORMEvictQueries( cacheName="", datasource="inventoryDB" );
See also
- ORM
- ORM - Caching
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)