You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do u guys have any interest in this feature to the library?
I specially needed this, since I added some extra stuff in other branches, and I have to use the file system quite often, to make sure the js/css files actually exist in the file system.
I ve been thinking that it may be better to change the entire code to async calls as well.
The text was updated successfully, but these errors were encountered:
Thanks for sharing this! It sounds like the js/css caching is very specific to your use case and probably isn't necessary for the general case since the contents of cartero.json are cached anyways.
".tmpl" files on the other hand are probably something we can cache so that they are not read from the file system every time. Since caching all of them could get pretty big though, we would want this to be an option into the middleware. At the same time, its pretty common to pre-compile templates into JavaScript when in production anyways, so this might not be a common use case.
I agree that we should make as much of the code async as possible.
Let use know if you want to open a PR for any of these things.
I`ve been thinking that it may be necessary to do some sort of caching of res.locals.js and res.locals.css.
Possibly res.locals.tmpl as well.
Here, in my branch, I did a cache of js/css, since thats what I am using.
https://github.com/lucastschmidt/cartero-express-hook/tree/cache_support
Do u guys have any interest in this feature to the library?
I specially needed this, since I added some extra stuff in other branches, and I have to use the file system quite often, to make sure the js/css files actually exist in the file system.
I ve been thinking that it may be better to change the entire code to async calls as well.
The text was updated successfully, but these errors were encountered: