Closed ysegorov closed 9 years ago
Thanks for trying t7 out and thank you for finding that bug. :)
@trueadm Why don't you just use template.join() for the cache key?
@joelrich Large strings for cache key results in slower lookup times than hashed results.
Have you verified that? I am asking because such property access of is very likely implemented as a hashtable (which does basically the same, just implemented in C).
In C, you have a limit on hashtables in terms of the key. Same applies here, especially with very large strings. Also, you should avoid using string.join() if you can avoid it as it's quite slow in all browsers.
Just a note on template key generation.
Considering this strange code
we will have the following in console
As for the library - excellent idea, Dominic! :)