Skip to content

Miscellaneous Functions

forgetCachedQueries()

forgetCachedQueries() — returns any

Available in: controller, model, mapper, migrator, migration, tabledefinition Category: General Functions

Clears the per-request finder cache that cacheQueriesDuringRequest fills, namespaced under the reserved request.wheels

model(“X”).forgetCachedQueries()`. outside a model.

NameTypeRequiredDefaultDescription
modelNamestringno—Clear only this model’s slot. Defaults to the calling model’s own name when invoked as
allbooleannofalseClear every model’s cached queries for the request. Required (true) to wipe everything from