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

Parse cache needs expiration policy #235

Open
cowsrule opened this issue Feb 3, 2015 · 1 comment
Open

Parse cache needs expiration policy #235

cowsrule opened this issue Feb 3, 2015 · 1 comment

Comments

@cowsrule
Copy link

cowsrule commented Feb 3, 2015

Any cached date entries may become invalid. In particular, when parsing relative dates such as 'today' / 'tomorrow' / 'yesterday' the cache entries for these must be invalidated when the date changes otherwise they represent the wrong date.

Specifically it looks like this is an issue with the replaceHash where it caches the relative dates once onload.

Quick example:
<< Current Date: 2/2/15 >>
Date.parse('tomorrow') => 2/3/15
<< Current Date 2/3/15 >>
Date.parse('tomorrow') => 2/3/15

@cowsrule cowsrule changed the title Cache needs expiration policy Parse cache needs expiration policy Feb 3, 2015
@abritinthebay
Copy link
Owner

Oooo very good point. Hmmm will have to rethink how the cache is implemented (it's very basic and naive right now)

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

No branches or pull requests

2 participants