Sha256: c815b5fc147d30dadc4acd37412bc436234df5844c5647eca1a1524655c0db5a

Contents?: true

Size: 766 Bytes

Versions: 29

Compression:

Stored size: 766 Bytes

Contents

// Copyright (c) 2021 Peter Ohler. All rights reserved.
// Licensed under the MIT License. See LICENSE file in the project root for license details.

#ifndef CACHE_H
#define CACHE_H

#include <ruby.h>
#include <stdbool.h>

#define CACHE_MAX_KEY 35

struct _cache;

extern struct _cache *cache_create(size_t size, VALUE (*form)(const char *str, size_t len), bool mark, bool locking);
extern void           cache_free(struct _cache *c);
extern void           cache_mark(struct _cache *c);
extern void           cache_set_form(struct _cache *c, VALUE (*form)(const char *str, size_t len));
extern VALUE          cache_intern(struct _cache *c, const char *key, size_t len);
extern void           cache_set_expunge_rate(struct _cache *c, int rate);

#endif /* CACHE_H */

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
oj-3.16.1 ext/oj/cache.h
oj-3.16.0 ext/oj/cache.h
oj-3.15.1 ext/oj/cache.h
oj-3.15.0 ext/oj/cache.h
oj-3.14.3 ext/oj/cache.h
oj-3.14.2 ext/oj/cache.h
oj-3.14.1 ext/oj/cache.h
oj-3.14.0 ext/oj/cache.h
oj-3.13.23 ext/oj/cache.h
oj-3.13.22 ext/oj/cache.h
oj-3.13.21 ext/oj/cache.h
oj-3.13.20 ext/oj/cache.h
oj-3.13.19 ext/oj/cache.h
oj-3.13.18 ext/oj/cache.h
oj-3.13.17 ext/oj/cache.h
oj-3.13.16 ext/oj/cache.h
oj-3.13.15 ext/oj/cache.h
oj-3.13.14 ext/oj/cache.h
oj-3.13.13 ext/oj/cache.h
oj-3.13.12 ext/oj/cache.h