clear

Remove all items. Also removes read-only datas

clear(onlyExpired = false)

Parameters

onlyExpired
{boolean} if true remove only expired items else remove all items, default false

Return

This method return a boolean

Exemples

OhMyCache.Local.set('key', 'value')
OhMyCache.Local.set('key2', 'value', {readonly: true})

OhMyCache.Local.clear() // true


OhMyCache.Local.get('key') // null

OhMyCache.Local.get('key2') // null