21 Feb 2001 01:13:15 UTC
- Distribution: Apache-Storage
- Module version: 1.1
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (6 / 10 / 0)
- KwaliteeBus factor: 0
- % Coverage
- License: unknown
- Activity24 month
- Download (4.05KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Apache::Storage - Storing data in Apache.
Ever wanted to store information in Apache so the additional requests could gain access to it?
For example, you create an object which is fairly expensive and you don't want to have to recreate each time, or say you just have some information you are storing in a reference that you want requests that follow you to see.
This module is for you.
It has three functions described below. They allow you to store and retrieve information from the Apache process. The functions are fairly simple and should make it pretty easy for you to do so without to much hassle.
All of this works with subrequests, so unlike pnotes, you don't need to worry about loosing data if your request is subrequested by an outside Apache module.
You can also use the ApacheStorage directive inside of Apache to prime data into the Apache::Storage.
Keep in mind that data is only stored on the Apache process itself. Different child processes all have their own storage. Don't assume you will get the same Apache child process when reconnecting.
Make sure you put a "PerlModule Apache::Storage" in your httpd.conf file. Apache make core if you do not do this.
Set functions can be called in two ways. They can be called with a key and a reference. The reference will then be available by calling it through a get function. You can also pass in hash reference. The contents of this hash will be mapped into storage based on it original key pair. Nothing is returned by either of these functions
Get functions can be calling in two ways. They can either be called with a single key, where they will return a single hash
This gives you a hash of the entire contents of what is being stored currently.
Takes two arguments, a key and a value. The value is evaled.
Takes no values, and only needs to be used if you don't have at least one ApacheStore call.
ServerAdmin firstname.lastname@example.org DocumentRoot /usr/local/apache/htdocs ServerName slash.tangent.org ErrorLog logs/error_log CustomLog logs/access_log common ApacheStoreINIT
ServerAdmin email@example.com DocumentRoot /usr/local/apache/htdocs ServerName slash2.tangent.org ErrorLog logs/error_log CustomLog logs/access_log common ApacheStore foo "[qw(skdjf slkdjf lskdjf)]"
See the file LICENSE that this comes with.
Brian Aker, firstname.lastname@example.org
Module Install Instructions
To install Apache::Storage, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Apache::Storage
For more information on module installation, please visit the detailed CPAN module installation guide.