summaryrefslogtreecommitdiff
path: root/include/ap_socache.h
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2008-12-12 15:56:15 +0000
committerJoe Orton <jorton@apache.org>2008-12-12 15:56:15 +0000
commitaa062c60f3a57cbac481d08d66659af7a436d5fd (patch)
treeb9be0e77b56312b1c64c7dc92005b86a509ead90 /include/ap_socache.h
parente92019fdcb2f8a05ffa88cd742f576645e9183bf (diff)
downloadhttpd-aa062c60f3a57cbac481d08d66659af7a436d5fd.tar.gz
socache API tweaks based on chrisd's review:
* include/ap_socache.h (ap_socache_provider_t::store): Take a pool. (ap_socache_provider_t::retrieve): Guarantee APR_NOTFOUND for a "not found" result. (ap_socache_provider_t::remove): Return an apr_status_t. * modules/cache/mod_socache_dc.c, modules/cache/mod_socache_dbm.c, modules/cache/mod_socache_shmcb, modules/cache/mod_socache_memcache.c: Adjust accordingly. * modules/ssl/ssl_scache.c (ssl_scache_store): Pass pool to sesscache->store. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726059 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/ap_socache.h')
-rw-r--r--include/ap_socache.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/ap_socache.h b/include/ap_socache.h
index d87ce76d29..ceb26bb2c1 100644
--- a/include/ap_socache.h
+++ b/include/ap_socache.h
@@ -116,11 +116,14 @@ typedef struct ap_socache_provider_t {
* @param expiry Absolute time at which the object expires
* @param data Data to store; binary blob
* @param datalen Length of data blob
+ * @param pool Pool for temporary allocations.
+ * @return APR status value.
*/
apr_status_t (*store)(ap_socache_instance_t *instance, server_rec *s,
const unsigned char *id, unsigned int idlen,
time_t expiry,
- unsigned char *data, unsigned int datalen);
+ unsigned char *data, unsigned int datalen,
+ apr_pool_t *pool);
/**
* Retrieve a cached object.
@@ -132,6 +135,8 @@ typedef struct ap_socache_provider_t {
* @param datalen On entry, length of data buffer; on exit, the
* number of bytes written to the data buffer.
* @param pool Pool for temporary allocations.
+ * @return APR status value; APR_NOTFOUND if the object was not
+ * found
*/
apr_status_t (*retrieve)(ap_socache_instance_t *instance, server_rec *s,
const unsigned char *id, unsigned int idlen,
@@ -145,9 +150,9 @@ typedef struct ap_socache_provider_t {
* @param idlen Length of id blob
* @param pool Pool for temporary allocations.
*/
- void (*remove)(ap_socache_instance_t *instance, server_rec *s,
- const unsigned char *id, unsigned int idlen,
- apr_pool_t *pool);
+ apr_status_t (*remove)(ap_socache_instance_t *instance, server_rec *s,
+ const unsigned char *id, unsigned int idlen,
+ apr_pool_t *pool);
/** Dump the status of a cache instance for mod_status. Will use
* the ap_r* interfaces to produce appropriate status output.