# Database

class Database extends Contract

## Methods

void
set(string $cacheName, mixed $contents)

Create a new cache files/value

mixed
get(string $cacheName, string $callBack = '')

Get cache value

bool
put(string $cacheName, mixed $contents)

Update cache value

void
destroy(string $cacheName)

Delete cache

void
purge()

Make cache clean as soon as posible

array
getList()

Get cache as list

string
getPath()

Get path or key of cache

bool
isExists(string $cacheName)

No description

string
getError()

No description

from Contract
__construct(array $expire)

Register all options

isExpire(string $cacheName)

No description

void
putIfExpire(string $cacheName, $contents)

Update|Create data if expired

## Details

###
at line 39
`void set(string $cacheName, mixed $contents)`

Create a new cache files/value

#### Parameters

string | $cacheName |
mixed | $contents |

#### Return Value

void |

###
at line 61
`mixed get(string $cacheName, string $callBack = '')`

Get cache value

#### Parameters

string | $cacheName |
string | $callBack |

#### Return Value

mixed |

###
at line 99
`bool put(string $cacheName, mixed $contents)`

Update cache value

#### Parameters

string | $cacheName |
mixed | $contents |

#### Return Value

bool |

###
at line 134
`void destroy(string $cacheName)`

Delete cache

#### Parameters

string | $cacheName |

#### Return Value

void |

###
at line 147
`void purge()`

Make cache clean as soon as posible

#### Return Value

void |

###
at line 167
`array getList()`

Get cache as list

#### Return Value

array |

###
at line 157
`string getPath()`

Get path or key of cache

#### Return Value

string |

###
at line 182
`bool isExists(string $cacheName)`

No description

#### Parameters

string | $cacheName |

#### Return Value

bool |

###
in Contract at line 81
`string getError()`

No description

#### Return Value

string |

###
at line 26
`__construct(array $expire)`

Register all options

#### Parameters

array | $expire |

###
at line 70
`isExpire(string $cacheName)`

No description

#### Parameters

string | $cacheName |

###
at line 121
`void putIfExpire(string $cacheName, $contents)`

Update|Create data if expired

#### Parameters

string | $cacheName |
| $contents |

#### Return Value

void |