Method: Rugged.__cache_usage__

Defined in:
ext/rugged/rugged.c

.__cache_usage__Array

Returns an array representing the current bytes in the internal libgit2 cache and the maximum size of the cache.

Returns:

  • (Array)
[View source]

386
387
388
389
390
391
# File 'ext/rugged/rugged.c', line 386

static VALUE rb_git_cache_usage(VALUE self)
{
	int64_t used, max;
	git_libgit2_opts(GIT_OPT_GET_CACHED_MEMORY, &used, &max);
	return rb_ary_new3(2, LL2NUM(used), LL2NUM(max));
}