Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

plack::middleware::expires(3pm) [debian man page]

Plack::Middleware::Expires(3pm) 			User Contributed Perl Documentation			   Plack::Middleware::Expires(3pm)

NAME
Plack::Middleware::Expires - mod_expires for plack 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. Note: Expires works only for successful response and If exists Expires HTTP header already, this middleware does not override. 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 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. perl v5.14.2 2010-11-11 Plack::Middleware::Expires(3pm)

Check Out this Related Man Page

Plack::Middleware::Conditional(3pm)			User Contributed Perl Documentation		       Plack::Middleware::Conditional(3pm)

NAME
Plack::Middleware::Conditional - Conditional wrapper for Plack middleware SYNOPSIS
use Plack::Builder; builder { enable_if { $_[0]->{REMOTE_ADDR} eq '127.0.0.1' } 'StackTrace', force => 1; $app; }; # or using the OO interface: $app = Plack::Middleware::Conditional->wrap( $app, condition => sub { $_[0]->{REMOTE_ADDR} eq '127.0.0.1' }, builder => sub { Plack::Middleware::StackTrace->wrap($_[0], force => 1) }, ); DESCRIPTION
Plack::Middleware::Conditional is a piece of meta-middleware, to run a specific middleware component under runtime conditions. The goal of this middleware is to avoid baking runtime configuration options in individual middleware components, and rather share them as another middleware component. EXAMPLES
Note that some of the middleware component names are just made up for the explanation and might not exist. # Minify JavaScript if the browser is Firefox enable_if { $_[0]->{HTTP_USER_AGENT} =~ /Firefox/ } 'JavaScriptMinifier'; # Enable Stacktrace when being accessed from the local network enable_if { $_[0]->{REMOTE_ADDR} =~ /^10.0.1.*/ } 'StackTrace'; # Work with other conditional setter middleware: # Transcode Jpeg on the fly for mobile clients builder { enable 'MobileDetector'; enable_if { $_[0]->{'plack.mobile_detected'} } 'TranscodeJpeg', max_size => 30_000; $app; }; Note that in the last example MobileDetector should come first because the conditional check runs in pre-run conditions, which is from outer to inner: that is, from the top to the bottom in the Builder DSL code. AUTHOR
Tatsuhiko Miyagawa Steve Cook SEE ALSO
Plack::Builder perl v5.14.2 2012-04-14 Plack::Middleware::Conditional(3pm)
Man Page

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script for remote Middleware

Hi Experts, :confused: I need help in one of my bit complicated script (for me complicated for experts like you might be simple). I have 100+ Middleware servers and 200+ DB servers and 200+ application servers in my environment. What I’m looking is I have a script ready sitting on one JUMP... (12 Replies)
Discussion started by: shiv2001in
12 Replies

2. HP-UX

Listing Middleware

I want to know if a server has J2EE application server installed, a webserver or any other middleware, is there a command to output a list or something like that. Thak you (1 Reply)
Discussion started by: eponcedeleonc
1 Replies

3. Red Hat

Password Policy description

Hi Experts, i would like to know the description of the following: Minimum: 0 Maximum: 90 Warning: 7 Inactive: -1 Last Change: Never Password Expires: Never Password Inactive: Never Account Expires: Never Does this means that... (2 Replies)
Discussion started by: yprudent
2 Replies

4. UNIX and Linux Applications

Middleware Documentation and logs

Good evening: I need your help please, I am new in Unix/Linux apps like middleware Thare are thousands of documentation about middleware stuff but i would like to have a broader understanding about middleware apps, so i ask you the following questions: 1. In an Enterprise what i am working... (2 Replies)
Discussion started by: alexcol
2 Replies

5. War Stories

Postbit Changes (Phase II Upgrade)

Next in the pipeline, thinking I will work on postbit (the core of the posts) and try to get Bootstrap and badges working in postbit and not break the quick editors in the post. Note, I had to turn off the scrollbars in postbit for now because when I turn them on, it breaks the quick editor in... (11 Replies)
Discussion started by: Neo
11 Replies