Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Commit

Permalink
added guides for new methods
Browse files Browse the repository at this point in the history
  • Loading branch information
boywithkeyboard committed Apr 16, 2022
1 parent 60cded5 commit 631876e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
24 changes: 24 additions & 0 deletions guide/features/export.md
Original file line number Diff line number Diff line change
@@ -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'))
```
24 changes: 24 additions & 0 deletions guide/features/import.md
Original file line number Diff line number Diff line change
@@ -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'))
```

0 comments on commit 631876e

Please sign in to comment.