On Nov 25, 2013, at 6:48PM, Jon <flashth...@gmail.com> wrote:

> Cachemere has the advantage of automatically updating the cache in memory 
> when files change on the file system.
> Another huge advantage is that you can specify optional preprocessors to 
> apply custom transformations to various files and will compress/gzip the 
> results by default.

yeah, jaws gives you a routes API so that you can proactively invalidate the 
cache on file change with a few lines of code. this has the added benefit of 
working for dynamic resources you create for a database provided that you can 
sit on state changes in the database an proactively invalidate in a similar 
fashion.                    

> 
> Basically, when a file which is cached changes on disk, its content will be 
> passed through your preprocessor function and gzipped and then that gzipped 
> content will be cached - Cachemere will also keep an uncompressed copy of 
> files in cache to cater for clients which do not support GZIP.
> So when a client which supports GZIP (which is almost all of them) requests a 
> file which is in cache, Cachemere will serve back the fully prepared, gzipped 
> content (it won't have to gzip every time thus sparing the CPU).

yeah, jaws is just an in-memory cache, that's because in most of my profiling 
the time spent on 90% of the resources can easily fit in memory. workloads 
differ of course but i've seen this pattern with multiple apps now.

> 
> Cachemere automatically sets ETag headers to facilitate client cache. So 
> effectively Cachemere will only serve
> a file's content to any given client once (unless that client/browser clears 
> their cache).
> ETags are based on the actual preprocessed/gzipped content (not on timestamps 
> or inode ids) so it scales well across multiple servers.

jaws does that too, it's an md5 of the uncompressed resource.

> 
> Finally, Cachemere sits really well with any existing code that you may 
> already have - It doesn't introduce its own routing logic or take over control
> of your http res object - You have full control at all stages of the 
> request-response cycle.

definitely interesting. jaws is meant to be a substitute for a web framework. 
writing your application "as a cache" can be challenging and requires changing 
some assumptions you have with most web frameworks so it's an advantage to be 
somewhat incompatible.

> 
> On Friday, November 22, 2013 11:14:43 AM UTC+11, Mikeal Rogers wrote:
> You might want to have a look at jaws
> 
> https://github.com/mikeal/jaws
> 
> You also probably want to start storing this stuff in isaacs' LRU.
> 
> https://github.com/isaacs/node-lru-cache
> 
> -Mikeal
> 
> On Nov 21, 2013, at 3:06PM, Jon <flash...@gmail.com> wrote:
> 
>> This is a tool I wrote which helps create efficient Node.js file servers and 
>> it also offers an auto-updating cache layer.
>> It caches preprocessed, gzipped file contents and also handles ETags by 
>> default for client-side caching.
>> It automatically updates the preprocessed, gzipped content whenever a cached 
>> file changes on the file system so you don't have to manually invalidate the 
>> cache or wait for a timeout.
>> 
>> Looking for feedback and contributors.
>> 
>> https://github.com/topcloud/cachemere
>> 
>> -- 
>> -- 
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to nod...@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+un...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to nodejs+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> -- 
> -- 
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to nodejs+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to