... | ... | @@ -64,7 +64,7 @@ There are two considerations to keep in mind when using event caching: |
|
|
|
|
|
2. **Cache Eviction**. Whenever the underlying data changes, it is essential to update the cache. This is best done through the convention of an interceptor, e.g. a Quick `postSave()` interception point that will clear all related API events. The example of `lookupUser` has a scenario (however unlikely) where a request is made for a login that doesn't yet exist, but is then added before the ten minute timeout expires. We would clear the relevant cache with this snipper:
|
|
|
|
|
|
`cachebox.getCache( "template" ).clearEvent('authenticate.lookupUser','username=' & arguments.username )`
|
|
|
`cachebox.getCache( "template" ).clearEvent('v1:authenticate.lookupUser','username=' & arguments.username )`
|
|
|
|
|
|
## API REST Convention
|
|
|
|
... | ... | |