diff --git a/guide/features/export.md b/guide/features/export.md new file mode 100644 index 0000000..a6717bb --- /dev/null +++ b/guide/features/export.md @@ -0,0 +1,24 @@ +[**» Back to Overview**](https://github.com/azurydev/cachu#features) + +## export() + +Export all records as a `.cachu` file. + +### Structure: + +```js +export(path, key) +``` + +### Parameters: + +- `path` - the path of the directory the file should be put into +- `key` - a 32-characters long key used to encrypt the data (required for importing) + +### Example: + +```js +import { join } from 'path' + +await cache.export(join(__dirname, '../directory')) +``` \ No newline at end of file diff --git a/guide/features/import.md b/guide/features/import.md new file mode 100644 index 0000000..f4bdf58 --- /dev/null +++ b/guide/features/import.md @@ -0,0 +1,24 @@ +[**» Back to Overview**](https://github.com/azurydev/cachu#features) + +## import() + +Import records from a `.cachu` file. + +### Structure: + +```js +import(path, key) +``` + +### Parameters: + +- `path` - the path of the file +- `key` - the 32-characters long key used to export the data + +### Example: + +```js +import { join } from 'path' + +await cache.import(join(__dirname, './path/to/the/file.cachu')) +``` \ No newline at end of file