News for hackers. Stuff that matters.
Re:JavaScript caching framework for client side caching in t... by ImDelicious on Sunday April 08, 2012 @09:43AM (#3813810)
I find the batch operations odd odd:

1. why have a different method for multiple values rather then check parameter type for the normal methods (e.g. if 'set' received an object or get received an array).

2. getMany returns an array instead of an object mapping key to value. Sure may be more efficient but less convenient to use.

Re:JavaScript caching framework for client side caching in t... by d0ugal on Sunday April 08, 2012 @09:53AM (#3813830)
Hmm. Good points. 1) I made them different operations just for clarity - however, it would make the API a little nicer if they were the same. 2) I agree with this - an object mapping would probably be easier.

Pull requests, issues etc. all welcome. Otherwise, I'll have a look at it myself.

Re:JavaScript caching framework for client side caching in t... by huskyr on Sunday April 08, 2012 @09:45AM (#3813815)
Agree with 1). Might be a matter of taste, but jQuery does this as well with many methods (e.g. $.on).