myMPD
Internal API documentation
Loading...
Searching...
No Matches
cache_disk.c File Reference

General disk cache handling. More...

#include "compile_time.h"
#include "src/lib/cache/cache_disk.h"
#include "src/lib/datetime.h"
#include "src/lib/filehandler.h"
#include "src/lib/log.h"
#include "src/lib/sds/sds_extras.h"
#include <dirent.h>
#include <errno.h>
#include <time.h>
Include dependency graph for cache_disk.c:

Functions

static int crop_dir (sds cache_basedir, const char *type, int keepdays)
void cache_disk_clear (struct t_config *config)
void cache_disk_crop (struct t_config *config)

Detailed Description

General disk cache handling.

Function Documentation

◆ cache_disk_clear()

void cache_disk_clear ( struct t_config * config)

Clears the caches unconditionally

Parameters
configpointer to static config

◆ cache_disk_crop()

void cache_disk_crop ( struct t_config * config)

Crops the caches respecting the keep_days settings

Parameters
configpointer to static config

◆ crop_dir()

int crop_dir ( sds cache_basedir,
const char * type,
int keepdays )
static

Crops a specific cache dir

Parameters
cache_basedircache basedir
typecache subdir
keepdaysexpiration in days
Returns
deleted file count on success, else -1