Kouhei Sutou
null+****@clear*****
Thu Sep 26 15:53:30 JST 2013
Kouhei Sutou 2013-09-26 15:53:30 +0900 (Thu, 26 Sep 2013) New Revision: 85d0784a8d53d4e766f75d0d5b466f10815576a2 https://github.com/groonga/groonga/commit/85d0784a8d53d4e766f75d0d5b466f10815576a2 Message: doc: document cache_limit command TODO: * update files * update po Added files: doc/source/example/reference/commands/cache_limit/get.log doc/source/example/reference/commands/cache_limit/set.log Modified files: doc/source/reference/commands/cache_limit.txt Added: doc/source/example/reference/commands/cache_limit/get.log (+4 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/cache_limit/get.log 2013-09-26 15:53:30 +0900 (38a43a9) @@ -0,0 +1,4 @@ +Execution example:: + + cache_limit + # [[0, 1337566253.89858, 0.000355720520019531], 100] Added: doc/source/example/reference/commands/cache_limit/set.log (+6 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/cache_limit/set.log 2013-09-26 15:53:30 +0900 (950a869) @@ -0,0 +1,6 @@ +Execution example:: + + cache_limit 10 + # [[0, 1337566253.89858, 0.000355720520019531], 100] + cache_limit + # [[0, 1337566253.89858, 0.000355720520019531], 10] Modified: doc/source/reference/commands/cache_limit.txt (+63 -31) =================================================================== --- doc/source/reference/commands/cache_limit.txt 2013-09-26 13:22:56 +0900 (8d0e1b5) +++ doc/source/reference/commands/cache_limit.txt 2013-09-26 15:53:30 +0900 (dc529a8) @@ -2,53 +2,85 @@ .. highlightlang:: none -cache_limit -=========== +.. groonga-command +.. database: commands_cache_limit -名前 ----- +``cache_limit`` +=============== -cache_limit - cacheサイズの設定・取得 +Summary +------- -書式 ----- -:: +``cache_limit`` gets or sets the max number of query cache +entries. Query cache is used only by :doc:`select` command. - cache_limit max +If the max number of query cache entries is 100, the recent 100 +``select`` commands are only cached. The cache expire algorithm is LRU +(least recently used). -説明 ----- +Syntax +------ -groonga組込コマンドの一つであるcache_limitについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。 +``cache_limit`` has one optional parameter:: -cache_limitは、クエリキャッシュの最大件数を取得したり設定したりします。 + cache_limit [max=null] -引数 ----- +Usage +----- + +You can get the current max number of cache entries by calling +``cache_limit`` without parameter. + +.. groonga-command +.. include:: ../../example/reference/commands/cache_limit/get.log +.. cache_limit + +You can set the max number of cache entries by calling ``cache_limit`` +with ``max`` parameter. + +Here is an example that sets ``10`` as the max number of cache +entries. + +.. groonga-command +.. include:: ../../example/reference/commands/cache_limit/set.log +.. cache_limit 10 +.. cache_limit + +If ``max`` parameter is used, the return value is the max number of +cache entries before ``max`` parameter is set. + + +Parameters +---------- + +This section describes all parameters. ``max`` +""""""" + +It specifies the max number of query cache entries as a number. + +If ``max`` parameter isn't specified, the current max number of query +cache entries isn't changed. ``cache_limit`` just returns the current +max number of query cache entries. - クエリキャッシュの最大件数を整数で指定します。 - maxが指定されなかった場合には、クエリキャッシュの最大件数は変更せず、 - 現在の設定値のみが返されます。 +Return value +------------ -返値 ----- +``cache_limit`` returns the current max number of query cache entries:: -json -^^^^ + [[HEADER, n_entries]] -:: +``HEADER`` - [以前の設定値] + See :doc:`/reference/command/output_format` about ``HEADER``. -``以前の設定値`` +``n_entries`` - すでに設定されていたクエリキャッシュの最大件数を返す。 + ``n_entries`` is the current max number of query cache entries. It + is a number. -例 --- -:: +See also +-------- - cache_limit 4 - [100] +* :doc:`select` -------------- next part -------------- HTML����������������������������...Download