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

Cache: create dependencies when closing macro #49

Merged
merged 1 commit into from Jan 29, 2017
Merged

Conversation

@vitkutny
Copy link
Contributor

vitkutny commented Jan 2, 2017

  • bug fix? no
  • BC break? no

prevents invalid expiration from dependencies callback when caching time-expensive data

example of code causing problem:

$dependencies = function () {
	return [Cache::Expiration => new DateTime('+1 second')];
};
{cache foo dependencies => $dependencies}
	{php sleep(2)} {* loading data *}
	bar
{cache}

current behaviour:
content is cached with zero expiration (-1 second)

expected behaviour:
content is cached for 1 second

- prevents invalid expiration from dependencies callback when caching time-expensive data
@dg dg force-pushed the nette:master branch 3 times, most recently from 492413c to b0b475e Jan 2, 2017
@dg dg force-pushed the nette:master branch 4 times, most recently from 6037e83 to 1fe69cc Jan 10, 2017
@dg dg force-pushed the nette:master branch 6 times, most recently from 1655c0f to 7c885a2 Jan 22, 2017
@dg dg force-pushed the nette:master branch 3 times, most recently from 29c60cc to 62bf8ec Jan 29, 2017
@dg dg merged commit ab673cc into nette:master Jan 29, 2017
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
coverage/coveralls Coverage increased (+0.1%) to 83.362%
Details
dg added a commit that referenced this pull request Jan 29, 2017
- prevents invalid expiration from dependencies callback when caching time-expensive data
dg added a commit that referenced this pull request Jan 29, 2017
- prevents invalid expiration from dependencies callback when caching time-expensive data
@vitkutny vitkutny deleted the vitkutny:cache-dependencies branch Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.