[Groonga-commit] droonga/droonga-http-server at af96620 [master] Provide API to clear cache.

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 19 19:06:22 JST 2014


YUKI Hiroshi	2014-11-19 19:06:22 +0900 (Wed, 19 Nov 2014)

  New Revision: af96620a514462633d6178316c99d426d023fdf7
  https://github.com/droonga/droonga-http-server/commit/af96620a514462633d6178316c99d426d023fdf7

  Message:
    Provide API to clear cache.
    
    For example:
    % curl -X DELETE "http://node0:10041/cache"

  Modified files:
    bin/droonga-http-server

  Modified: bin/droonga-http-server (+5 -0)
===================================================================
--- bin/droonga-http-server    2014-11-19 18:36:50 +0900 (f84d5c2)
+++ bin/droonga-http-server    2014-11-19 19:06:22 +0900 (f6c2c8a)
@@ -122,6 +122,11 @@ if (options.cacheSize > 0) {
       rules:  cacheMiddlewareRules,
       logger: logger
     }));
+    application.delete('/cache', function(request, response, next) {
+      cache.clear(function(error) {
+        response.jsonp(error ? false : true);
+      });
+    });
   }
 }
 
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index