Skip to content

cant eval args in cache_key in <%block> #180

Description

@sqlalchemy-bot

Migrated issue, originally created by Michael Bayer (@zzzeek)

Unfortunately there is another one. That one is related to <%block> tag (both anonymous and named).

FAILS: <%block cached="True" cache_key="${route_args.locale}">
WORKAROUND: <%block cached="True" cache_key="${context.get('route_args').locale}">

The bug happens when context variable (route_args) is first used in cache_key (and not anywhere else in template). I have similar logic using in <%page> directive and it works just fine there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions