Hi, I recently fixed the generation of the "templates.php" cache generation and lookup for LiipThemeBundle, which got me thinking if the solution we implemented could reuse the ClassLoader.
Here is the cache generation code in FrameworkBundle: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php Here is the code that uses this cache: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php Essentially what this code does is generate a key-value cache if identifiers to file mapping, which to me seems quite similar to what we are doing on ClassLoader and it would be kind of nice to be able to give more flexibility in building up this cache. Currently we support dynamic lookup (similar to the UniversalClassLoader) and generating an array map (MapClassLoader) but we dont have something like ApcUniversalClassLoader that dynamically looks up but caches any successful lookup and more importantly its not extensible. Then again maybe we dont need that level of flexibility there, but these array maps can get kind of huge and also right now all lookups are dynamic unless one uses cache warming. Anyway, I havent really looked into making it possible and not sure when I will have time to, so I just wanted to throw this idea on the list in case someone else wants to kick up the ball and run with it. regards, Lukas Kahwe Smith [email protected] -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
