using NetVips.Internal;
namespace NetVips;
///
/// A class around libvips' operation cache.
///
public static class Cache
{
///
/// Gets or sets the maximum number of operations libvips keeps in cache.
///
public static int Max
{
get => Vips.CacheGetMax();
set => Vips.CacheSetMax(value);
}
///
/// Gets or sets the maximum amount of tracked memory allowed.
///
public static ulong MaxMem
{
get => Vips.CacheGetMaxMem();
set => Vips.CacheSetMaxMem(value);
}
///
/// Gets or sets the maximum amount of tracked files allowed.
///
public static int MaxFiles
{
get => Vips.CacheGetMaxFiles();
set => Vips.CacheSetMaxFiles(value);
}
///
/// Gets the current number of operations in cache.
///
public static int Size => Vips.CacheGetSize();
///
/// Enable or disable libvips cache tracing.
///
public static bool Trace
{
set => Vips.CacheSetTrace(value);
}
}