Skip to content

A generator that creates models that can be stored in memcache and later written to the database asynchronously.

License

Notifications You must be signed in to change notification settings

marksim/cacheharvester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CacheHarvester
==============

CacheHarvester is a plugin that allows you to write information to MemCache and harvest it asynchronously later.

This is very useful for write-heavy sites that record data.   CacheHarvester can be distributed across multiple
instances of a rails application and multiple memcache servers, either as a pool or as separate entities.   There 
should be one daemon per harvestable model running for each separate pool of memcache servers.

This cache uses the Rails default cache store.   Modify your config/environments/* file and add 
	config.cache_store = :mem_cache_store

Dependencies: 
	daemons
	yaml
	timeout

Example
=======

To generate a new harvestable model
	script/generate harvestable_model <ModelName> [column:type [column:type [...]]]
	
Then in your controller, use
	<ModelName>.new(options).store
	
to write it to the cache.   It will be harvested when the daemon is run.

To manage the daemon, use.   (Add this to your capistrano recipes after :restart hook)
	./script/daemons [start|stop|restart]

Copyright (c) 2009 Mark Simoneau, released under the MIT license

About

A generator that creates models that can be stored in memcache and later written to the database asynchronously.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages