adonis-cache
adonis-cache copied to clipboard
'remember' method is not working correctly
trafficstars
test1 route
public async all() {
return await Cache.remember('saved', 60, async function () {
return await Saved.all()
})
}
test2 route
public async all() {
return await Cache.remember('users', 60, async function () {
return await Users.all()
})
}
Problem: Whichever route I request first, the results from that route are also recorded in all other 'remember' methods.
Example scenario 1
- step 1: request test1 route > result saved
- step 2: request test2 route > result saved
Example scenario 2
- step 1: request test2 route > result users
- step 2: request test1 route > result users
This library is useless in its current state.