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


Manual Reference Pages  -  PLACK::MIDDLEWARE::EXPIRES (3)

.ds Aq ’

NAME

Plack::Middleware::Expires - mod_expires for plack

CONTENTS

SYNOPSIS



  use Plack::Builder;

  builder {
      enable Expires,
        content_type => qr!^image/!i,
        expires => access plus 3 months;
      $app;
  }



DESCRIPTION

Plack::Middleware::Expires is Apache’s mod_expires for Plack. This middleware controls the setting of Expires HTTP header and the max-age directive of the Cache-Control HTTP header in server responses.

<B>NoteB>:
o Expires works only for successful response,
o If an Expires HTTP header exists already, it will not be overridden by this middleware.

CONFIGURATIONS

content_type


  content_type => qr!^image!,
  content_type => text/css,
  content_type => [ text/css, application/javascript, qr!^image/! ]



Content-Type header to apply Expires

also content_type accept CodeRef



  content_type => sub { my $env = shift; return 1 if $env->{..} }



Expires Same format as the Apache mod_expires



  expires => M3600 # last_modified + 1 hour
  expires => A86400 # access + 1 day
  expires => modification plus 3 years 3 month 3 day
  expires => access plus 3 days



AUTHOR

Masahiro Nagano <kazeburo {at} gmail.com>

SEE ALSO

<http://httpd.apache.org/docs/2.2/en/mod/mod_expires.html>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PLACK::MIDDLEWARE::EXPIRES (3) 2016-04-03

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