Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users
Serving "static" content from DB
 

Index | Next | Previous | View Flat


mihai at bazon

Jun 6, 2009, 4:17 AM


Views: 1027
Permalink
Serving "static" content from DB

Hi folks,

I'm working on a simple CMS (actually started it for learning Catalyst,
but the goal is to be able to maintain a few websites with it). Each
page is stored in DB and it can have file attachments, also stored in DB
(content is BLOB).

When serving an attachment, instead of always retrieving it from DB I
want to save them in a cache directory. So the first time a file is
requested, it will be fetched from DB, saved in cache, then I want the
Web server to do the job as if it were a static file. With plain
ModPerl, I would do it like this:

$r->filename($path_to_saved_file);
# plus some more hacks if it runs after PerlMapToStorageHandler
return Apache2::Const::DECLINED;

I expect something similar will work with Catalyst using the ModPerl2
engine, but I was wondering if I can do something that would work well
with the development server and FastCGI as well.

Thanks for any hints.
-Mihai
_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Subject User Time
Serving "static" content from DB mihai at bazon Jun 6, 2009, 4:17 AM
    Re: Serving "static" content from DB kieren at diment Jun 6, 2009, 4:40 AM
    Re: Serving "static" content from DB catalyst at iandocherty Jun 6, 2009, 4:41 AM
        Re: Serving "static" content from DB romkey at apocalypse Jun 6, 2009, 5:51 AM
    Re: Serving "static" content from DB mihai at bazon Jun 6, 2009, 5:07 AM
    Re: Serving "static" content from DB orasnita at gmail Jun 6, 2009, 6:34 AM
        Re: Serving "static" content from DB ash_cpan at firemirror Jun 6, 2009, 6:49 AM
    Re: Serving "static" content from DB mihai at bazon Jun 6, 2009, 11:58 AM
        Re: Serving "static" content from DB cosimo at streppone Jun 6, 2009, 12:25 PM
            Re: Serving "static" content from DB mihai at bazon Jun 7, 2009, 5:01 AM
                Re: Serving "static" content from DB moseley at hank Jun 7, 2009, 8:21 AM
                Re: Serving "static" content from DB cosimo at streppone Jun 7, 2009, 11:43 AM
    Re: Serving "static" content from DB lists at eightdegrees Jun 6, 2009, 5:18 PM
    Re: Serving "static" content from DB pagaltzis at gmx Jun 14, 2009, 3:30 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.