Groonga
Loading...
Searching...
No Matches
cache.h
Go to the documentation of this file.
1/*
2 Copyright(C) 2013-2017 Brazil
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17*/
18
19#pragma once
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#define GRN_CACHE_DEFAULT_MAX_N_ENTRIES 100
32typedef struct _grn_cache grn_cache;
33
34GRN_API void
35grn_set_default_cache_base_path(const char *base_path);
36GRN_API const char *
38
90grn_persistent_cache_open(grn_ctx *ctx, const char *base_path);
101
123
126
137grn_cache_set_max_n_entries(grn_ctx *ctx, grn_cache *cache, unsigned int n);
146GRN_API unsigned int
148
149#ifdef __cplusplus
150}
151#endif
GRN_API grn_rc grn_cache_default_reopen(void)
GRN_API grn_cache * grn_persistent_cache_open(grn_ctx *ctx, const char *base_path)
GRN_API grn_cache * grn_cache_current_get(grn_ctx *ctx)
Retrieve the current grn_cache object.
GRN_API grn_rc grn_cache_current_set(grn_ctx *ctx, grn_cache *cache)
Set the current grn_cache object.
GRN_API grn_rc grn_cache_close(grn_ctx *ctx, grn_cache *cache)
Free resourses of the cache.
GRN_API grn_cache * grn_cache_open(grn_ctx *ctx)
Create a new cache object.
GRN_API void grn_set_default_cache_base_path(const char *base_path)
GRN_API unsigned int grn_cache_get_max_n_entries(grn_ctx *ctx, grn_cache *cache)
Retrieve the maximum number of entries in the grn_cache object.
GRN_API const char * grn_get_default_cache_base_path(void)
GRN_API grn_rc grn_cache_set_max_n_entries(grn_ctx *ctx, grn_cache *cache, unsigned int n)
Set the maximum number of entries in the grn_cache object.
struct _grn_cache grn_cache
Cache object.
Definition cache.h:32
grn_rc
Definition groonga.h:61
#define GRN_API
Definition groonga.h:39
Definition groonga.h:351