file upload, multipart form, and cgi::cache
am 21.04.2006 13:01:54 von LLCoolSayNot sure if folks frequent this forum but if you see this and can/do
help, I'd be much obliged
I am trying to implement caching in a cgi app I am writing for my
company and am having trouble when an attachment is uploaded as a part
of the multipart form. This is the error that I get.
Can't store GLOB items at ../../lib/Storable.pm (autosplit into
.../../lib/auto/Storable/_freeze.al) line 287, at
/usr/local/perl587/lib/site_perl/5.8.7/CGI/Cache.pm line 251
Here's how I am setting up my Cache.
CGI::Cache::setup( { cache_options =>
{ cache_root => '/tmp/CGI_Cache',
namespace => 'myapp_cgi',
directory_umask => 077,
max_size => 20 * 1024 * 1024,
default_expires_in => '12 hours',
}
} );
my $c = new CGI;
my $params = $c->Vars;
delete $params->{'uploaded_file'};
CGI::Cache::set_key( $params );
CGI::Cache::invalidate_cache_entry() if $c->param( 'force_regenerate' )
eq 'true';
CGI::Cache::start() or exit;
As you can see up here, I even tried to not include the upload_file
parameter as a part of the key bu that didnt help. I also tried to put
CGI::Cache::pause() and CGI::Cache::continue() around the sub that
performs the upload in the app but that didnt help either.
Any ideas/suggestions would be much appreciated.
regards,
Sam