This repository has been archived by the owner. It is now read-only.

cachify injects stuff into the global namespace #16

lloyd opened this Issue Jul 4, 2012 · 3 comments


None yet
4 participants

lloyd commented Jul 4, 2012

$ node
> require('connect-cachify');
{ setup: [Function],
  cachify_js: [Function],
  cachify_css: [Function],
  cachify: [Function] }
> cachify_js

In BrowserID, we actually rely on this behavior (maybe accidentally?). In our templates we use cachify functions and we never actually pass them in.

I'd think it might be safer to not inject into the global namespace. I'd write a patch if you agreed, but what do you think?


seanmonstar commented Jul 5, 2012

Keep the global clean! And, I imagine express lets us define default function helpers to templates.


lloyd commented Jul 5, 2012

yes! @zcarter taught me this one:

res.local('cachify_js', cachify.cachify_js);

is all we would have to add to keep things going in browserid.


ozten commented Jul 8, 2012

My bad. Please fix.

@ghost ghost assigned seanmonstar Sep 21, 2012

@seanmonstar seanmonstar reopened this Sep 21, 2012

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.