GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Gantry::Plugins::PageCache(3) User Contributed Perl Documentation Gantry::Plugins::PageCache(3)

Gantry::Plugins::PageCache - A plugin for caching application pages

In Apache Perl startup or app.cgi or app.server:

    <Perl>
        # ...
        use MyApp qw{ 
            -Engine=CGI 
            -TemplateEngine=TT 
            Cache::FastMap # or Cache::Storable 
            PageCache 
        };
                
    </Perl>

The purpose of the plugin is to store and retrieve cached application pages.

Note that you must include PageCache in the list of imported items when you use your base app module.

The following items can be set by configuration. If any of the following match then caching will be enabled.

** At least one cache criteria must be set.

Cache pages based on a certain action.

 $self->gantry_pagecache_action( 'do_edit,do_delete,do_view' );

Cache pages based on the mime types.

 $self->gantry_pagecache_mime_type( 'text/html,text/rss' );

Cache every page that is produced by a controller.

 $self->gantry_pagecache_location( '/controller1' );

Cache distinct pages produced by a controller.

 $self->gantry_pagecache_uri( '/controller1/rss' );

get_callbacks
For use by Gantry.pm. Registers the callbacks needed for cache management during the PerlHandler Apache phase or its moral equivalent.
gantry_pagecache_store
Callback to store the cached page.
gantry_pagecache_retrieve
Callback to retrieve the cached page.
gantry_pagecache_location
Location(s) to cache
gantry_pagecache_action
Action(s) to cache
gantry_pagecache_crud
Boolean accessor for whether to attempt caching of CRUD behaviors.
gantry_pagecache_mime_type
MIME type(s) to cache
gantry_pagecache_uri
URI(s) to cache
gantry_pagecache
Holds the cache key if caching is enabled

Add a caching scheme where you can use an SQL::Abstract like syntax.

 {
    -and => {
        mime_type = [
            'text/html',
            'text/rss',
        ],
        location = [
            '/controller1',
            '/controller2',
        ],
    },
    -or => {
        mime_type => { '!=', 'img/gif' } 
    }
 }

    Gantry

Tim Keefer <tim@timkeefer.com>

Copyright (C) 2007 Tim Keefer

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.