You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Glen Koundry <gk...@optonline.net> on 2004/08/16 16:18:21 UTC

Storing large amounts of data in the $Application object

    I am creating a web application and I some hashes loaded with data I want to make available to all sessions, so I tried the command: 

$Application->{mydata} = \%somehash;  

but this chokes due to the fact that the $Application object is stored using the DBM system which has a size limit of around 1000 bytes (it works fine if the hash in question is less than 1kb).  

    Is there any way to have large data sets available to all sessions?  Also, is there a way to make sure this data is kept in memory (I assume the DBM system uses disk files)?

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


RE: Storing large amounts of data in the $Application object

Posted by John Drago <jo...@e-commedia.com>.
Apache::ASP uses MLDBM by default.  You can use a different tied-hash class
if you want.  There are several on CPAN.

You may also want to take a look at BerkeleyDB from CPAN.  IIRC it doesn't
have the 1Kb limit.



 

-----Original Message-----
From: Glen Koundry [mailto:gkoundr@optonline.net] 
Sent: Monday, August 16, 2004 8:18 AM
To: asp@perl.apache.org
Subject: Storing large amounts of data in the $Application object

    I am creating a web application and I some hashes loaded with data I
want to make available to all sessions, so I tried the command: 

$Application->{mydata} = \%somehash;  

but this chokes due to the fact that the $Application object is stored using
the DBM system which has a size limit of around 1000 bytes (it works fine if
the hash in question is less than 1kb).  

    Is there any way to have large data sets available to all sessions?
Also, is there a way to make sure this data is kept in memory (I assume the
DBM system uses disk files)?

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org