
SunWuKung
New User
Apr 25, 2002, 2:11 PM
Post #1 of 1
(1021 views)
|
|
Caching between sessions
|
Can't Post
|
|
Hi, I am trying to put togather a script that will be called from an other application. Unfortunately the startup of the script is very slow because it reads a lot of data in. This data is static. Could somebody suggest a way how to solve that I would only need to wait for this reading once and on subsequent calls the data would already be cached? Below is what I tried, but it returned a Can't store GLOB items error. Maybe I am doing the whole thing wrong. Anybody any suggestions? Many thanks for the help. SWK use WordNet::QueryData; use Cache::FileCache; my $cache = new Cache::FileCache( ); my $wn = $cache->get( $cache ); if ( not defined $wn ) { my $wn = WordNet::QueryData->new; ------ this is the line that takes a long time $cache->set( $cache, $wn, "10 minutes" ); ------ this is the line returning the error }
|