Catalyst::ActionRole::NotCacheableHeaders - Set no cache headers for actions
version 0.02
package MyApp::Controller::Foo; use Moose; use namespace::autoclean; BEGIN { extends 'Catalyst::Controller::ActionRole' } __PACKAGE__->config( action_roles => [qw( NotCacheableHeaders )], ); sub dont_cache_me : Local NotCacheable { ... }
Provides a ActionRole to set HTTP headers instructing proxies and browsers to not cache the response.
Pragma: no-cache Cache-Control: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Last-Modified: %current time%
Please note that if any of above headers were already set they will be overwritten.
Take a look at Catalyst::ActionRole::ExpiresHeader if you want to set the Expires header only.
Expires
Alex J. G. Burzyński <ajgb@cpan.org>
This software is copyright (c) 2010 by Alex J. G. Burzyński <ajgb@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Catalyst::ActionRole::NotCacheableHeaders, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::ActionRole::NotCacheableHeaders
CPAN shell
perl -MCPAN -e shell install Catalyst::ActionRole::NotCacheableHeaders
For more information on module installation, please visit the detailed CPAN module installation guide.