[mapserver-commits] r12327 - trunk/mapserver/mapcache/src
svn at osgeo.org
svn at osgeo.org
Fri Aug 26 07:17:11 EDT 2011
Author: tbonfort
Date: 2011-08-26 04:17:11 -0700 (Fri, 26 Aug 2011)
New Revision: 12327
Modified:
trunk/mapserver/mapcache/src/cache_memcache.c
Log:
add srs aliases to WMS GetCapabilities
thomas.bonfort | 2011-03-07 13:39:32 +0100 (Mon, 07 Mar 2011)
Modified: trunk/mapserver/mapcache/src/cache_memcache.c
===================================================================
--- trunk/mapserver/mapcache/src/cache_memcache.c 2011-08-26 11:17:08 UTC (rev 12326)
+++ trunk/mapserver/mapcache/src/cache_memcache.c 2011-08-26 11:17:11 UTC (rev 12327)
@@ -77,6 +77,20 @@
return GEOCACHE_TRUE;
}
+static void _geocache_cache_memcache_delete(geocache_context *ctx, geocache_tile *tile) {
+ char *key;
+ int rv;
+ char errmsg[120];
+ geocache_cache_memcache *cache = (geocache_cache_memcache*)tile->tileset->cache;
+ _geocache_cache_memcache_tile_key(ctx, tile, &key);
+ GC_CHECK_ERROR(ctx);
+ rv = apr_memcache_delete(cache->memcache,key,0);
+ if(rv != APR_SUCCESS) {
+ int code = 500;
+ if(rv == APR_NOTFOUND) code=404;
+ ctx->set_error(ctx,code,"memcache: failed to delete key %s: %s", key, apr_strerror(rv,errmsg,120));
+ }
+}
/**
* \brief get content of given tile
@@ -214,6 +228,7 @@
cache->cache.tile_get = _geocache_cache_memcache_get;
cache->cache.tile_exists = _geocache_cache_memcache_has_tile;
cache->cache.tile_set = _geocache_cache_memcache_set;
+ cache->cache.tile_delete = _geocache_cache_memcache_delete;
cache->cache.configuration_check = _geocache_cache_memcache_configuration_check;
cache->cache.configuration_parse = _geocache_cache_memcache_configuration_parse;
return (geocache_cache*)cache;
More information about the mapserver-commits
mailing list