On Saturday 22 November 2003 10:48 am, Tom Schindl wrote: > It does not always have to be SHM using Cache::Cache you could also > share data using the e.g. the filesystem. > > Another possibility would be to use BerkeleyDB which works perfectly see > also http://www.perl.com/pub/a/2001/10/17/etoys.html
Yeah, but what would be the point? Then your taking data from one object store (the main one) and putting it into a cache which is probably no faster than where you normally store it. (IE, if Berkeley DB is such a great cache then why not always keep your objects there....). Berkeley DB or SHM or whatnot MIGHT beat out a fast RDBMS like MySQL in some cases, but in my experience its most likely the speed gain will be slight to nothing and the increase in application complexity will be fairly significant. Also remember that ANY cache will have to serialize all accesses to each object, which if your application hits a lot of objects fairly often will most likely bottleneck you at the cache with possibly serious total system throughput limitations. OTOH if MySQL were to be your bottleneck you could always move your database off to faster hardware, build a cluster, etc. > > Tom > > Am Fr, 2003-11-21 um 01.15 schrieb Matthew Smith: > > > From: "Ken Burcham" <[EMAIL PROTECTED]> > > > > > > can I do that lookup just once > > > and stuff it somewhere like an application server variable? > > > > I use Apache::AxKit::Plugin::Session, there is a 'Global' taglib that > > let's you share data between all instances of apache. It's a bit > > involved though, if you're not doing access and authentication it might > > be easier to directly use Apache::Session, there is a shared memory > > module which would do the job. Maybe others have recomendations on the > > best way to access shared memory for mod_perl. > > > > > where does this cache > > > > > > live? Or does it? > > > > My understanding is that it is stored in the memory of the perl instance > > that is running. I also understand that there is a perl instance for > > each apache server instance running - so things can get out of sync if > > your browser comes in on a different server - hence the need for a > > shared memory storage. > > > > matt > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Tod Harter Giant Electronic Brain http://www.giantelectronicbrain.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
