couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caolan McMahon (JIRA)" <>
Subject [jira] Commented: (COUCHDB-890) Add caching to CommonJS modules
Date Wed, 23 Feb 2011 09:39:38 GMT


Caolan McMahon commented on COUCHDB-890:

Having a module cache that can persist state between requests might not be a good idea since
it could be unreliable with multiple js processes or break the caching rules. How would you
know if a resource has changed if it also depends on the state of commonjs modules?

See: for a patch that implements a module
cache which is cleared between requests. You don't get the same performance benefits, but
you do get increased compatibility with modules which store some state on the module (such
as template libraries), and it also fixes circular requires.

> Add caching to CommonJS modules
> -------------------------------
>                 Key: COUCHDB-890
>                 URL:
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: JavaScript View Server
>         Environment: All
>            Reporter: mikeal
>         Attachments: commonjscache.diff
> We need some caching in the commonjs modules so that when you require('jsdom') it doesn't
eval it every time you do a GET request to a show function.
> Patch coming.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message