Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'remember' method is not working correctly #21

Open
mertgibi opened this issue Nov 5, 2023 · 0 comments
Open

'remember' method is not working correctly #21

mertgibi opened this issue Nov 5, 2023 · 0 comments

Comments

@mertgibi
Copy link

mertgibi commented Nov 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant