Skip to content

Fix custom cache key mechanism for shorthand syntax#35

Open
shreve wants to merge 1 commit inton8:masterfrom
shreve:master
Open

Fix custom cache key mechanism for shorthand syntax#35
shreve wants to merge 1 commit inton8:masterfrom
shreve:master

Conversation

@shreve
Copy link

@shreve shreve commented Nov 4, 2016

According to the docs, multi_fetch_fragments supports the shorthand
syntax, render @items, cache: true. This is true for boolean values,
but does not support custom cache keys via proc or lambda values. This
is because the shorthand passes cache to @locals rather than @options,
and the search for the callable object is limited to @options.

This commit adds @locals to that search.

According to the docs, multi_fetch_fragments supports the shorthand
syntax, `render @Items, cache: true`. This is true for boolean values,
but does not support custom cache keys via proc or lambda values. This
is because the shorthand passes cache to @Locals rather than @options,
and the search for the callable object is limited to @options.

This commit adds @Locals to that search.
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

Successfully merging this pull request may close these issues.

1 participant