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

Dynamic cache-key with side effects does not work #89

Closed
somebee opened this issue Dec 21, 2016 · 3 comments
Closed

Dynamic cache-key with side effects does not work #89

somebee opened this issue Dec 21, 2016 · 3 comments
Assignees
Labels

Comments

@somebee
Copy link
Member

somebee commented Dec 21, 2016

<div@{i++}> ends up incrementing the counter twice.

@somebee somebee added the bug label Dec 21, 2016
@somebee somebee self-assigned this Dec 21, 2016
@madmaniak
Copy link
Member

What's the use case for dynamic cache-key?

@somebee
Copy link
Member Author

somebee commented Dec 22, 2016

It is useful when you want to render tags that should be cached but are not inside or named tags. Here is a very short (and clumsy) explanation at scrimba.com - What is the use-case for dynamic cache-keys? :)

@madmaniak
Copy link
Member

Oh sorry, this part I know - I was just wondering what's this construct for {i++}?
But despite that, this looks awesome 🙀 I've learnt I don't need render and self at the and of build anymore. Probably looking for {object:id} by default if exist would be too much and hit performance. What do you think?

somebee added a commit that referenced this issue Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants