This repository has been archived by the owner on Nov 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60cded5
commit 631876e
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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')) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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')) | ||
``` |