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

token_re_cache in javascript implementation doesn't do anything? #71

Closed
GoogleCodeExporter opened this issue Aug 6, 2015 · 2 comments
Closed

Comments

@GoogleCodeExporter
Copy link

In the code, the token_re_cache is used to cache regular expressions. But it 
appears nothing is ever put into the cache. A good thing too, as token_re 
should be recreated each time during compilation otherwise its lastIndex 
property isn't reset to 0. At least, I think that's what's going on (I was 
wondering how it could work with the cache in the first place; turned out the 
cache doesn't work).

Original issue reported on code.google.com by martijn....@gmail.com on 10 May 2012 at 2:21

@GoogleCodeExporter
Copy link
Author

Good catch, thanks.  I guess I should just get rid of the cache because the 
lack of the caching apparently hasn't any issues for anyone.

I can't imagine that anyone would compile more than 10 or 100 templates per 
page, and it's probably negligible then.  I think it was a carryover from 
Python, where you could imagine a huge server loading thousands of templates.

Original comment by andyc...@gmail.com on 19 May 2012 at 12:26

@GoogleCodeExporter
Copy link
Author

Fixed with changeset:   440:42ec17bd6386

Original comment by andyc...@gmail.com on 19 May 2012 at 12:31

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant