GithubHelp home page GithubHelp logo

Comments (4)

simon-liebehenschel avatar simon-liebehenschel commented on September 22, 2024

Can you show a small reproducible code example?

from cashews.

lineup-tk avatar lineup-tk commented on September 22, 2024

I cannot share the actual code because it's a sensitive application. But I can show an example endpoint with the decorator:

@router.get("/test/{id}/", response_model=Page)
@cache(
    ttl="5m",
    key="test-plans-id:{id}-{params}",
)
async def read_test_plans(
    *,
    params: Params = Depends(),
    id: int,
) -> Any:
    """
    Fetch a list of Venue Plans.
    """
    return Page(data=["test1", "test2"], metadata=MetaData(number_of_results=2))

The cache is setup as in my original post.

Here is a larger stack trace too:

                                                                                 File /code/.venv/lib/python3.10/site-packages/cashews/wrapper/decorators.py, line 56, in _call
                                                                                   File /code/.venv/lib/python3.10/site-packages/cashews/decorators/locked.py, line 96, in _wrapper
                                                                             File /code/.venv/lib/python3.10/site-packages/cashews/decorators/cache/simple.py, line 51, in _wrap
                                                                                    File /code/.venv/lib/python3.10/site-packages/cashews/wrapper/commands.py, line 31, in get
                                                                                                                                  File /code/./app/caching.py, line 19, in logging_middleware
                                                                             File /code/.venv/lib/python3.10/site-packages/cashews/wrapper/disable_control.py, line 18, in _is_disable_middleware
                                                                                          File /code/.venv/lib/python3.10/site-packages/cashews/validation.py, line 84, in _invalidate_middleware
                                                                                   File /code/.venv/lib/python3.10/site-packages/cashews/wrapper/auto_init.py, line 18, in _auto_init
                                                                          File /code/.venv/lib/python3.10/site-packages/cashews/backends/redis/client_side.py, line 80, in init
                                                                          File /code/.venv/lib/python3.10/site-packages/cashews/backends/redis/client_side.py, line 97, in _listen_invalidate_forever
                                                                          File /code/.venv/lib/python3.10/site-packages/cashews/backends/redis/client_side.py, line 118, in _listen_invalidate
                                                                          File /code/.venv/lib/python3.10/site-packages/cashews/backends/redis/client_side.py, line 110, in _get_channel

from cashews.

Krukov avatar Krukov commented on September 22, 2024

Hi @lineup-tk thanks for reporting this issue.

Unfortunately I can't reproduce this issue, please provide more information about your env - output of pip freeze and python -V

from cashews.

Krukov avatar Krukov commented on September 22, 2024

I closed this issue, fill free to reopen it with more details about your env

from cashews.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.