Skip to content

Commit

Permalink
Merge pull request #265 from ardriveapp/PE-943
Browse files Browse the repository at this point in the history
docs(readme): Update readme with persistent cache info PE-943
  • Loading branch information
arielmelendez authored Mar 23, 2022
2 parents 3be0b6f + 0e4c6f5 commit 8525568
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .pnp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ ardrive upload-file --wallet-file /path/to/my/wallet.json --parent-folder-id "f0
4. [Front-run Congestion By Boosting Miner Rewards](#boost)
5. [Send AR Transactions From a Cold Wallet](#cold-tx)
6. [Using a Custom Arweave Gateway](#using-a-custom-arweave-gateway)
7. [Persistent Caching of ArFS Entity Metadata](#metadata-caching)
4. [All ArDrive CLI Commands](#all-ardrive-cli-commands)
5. [Getting Help](#getting-help)

Expand Down Expand Up @@ -1228,6 +1229,23 @@ ardrive list-drive -d { drive id from create drive }
ardrive download-file -f { file id from upload file }
```
### Persistent Caching of ArFS Entity Metadata<a id="metadata-caching"></a>
To avoid redundant requests to the Arweave network for immutable ArFS entity metadata, a persistent file cache is created and maintained at:
```
Windows: <os.homedir()>/ardrive-caches/metadata
Non-Windows: <os.homedir()>/.ardrive/caches/metadata
```
The `XDG_CACHE_HOME` environment variable is honored, where applicable, and will be used in place of `os.homedir()` in the scenarios described above.
Metadata cache logging to stderr can be enabled by setting the `ARDRIVE_CACHE_LOG` environment variable to `1`.
Cache performance is UNDEFINED for multi-process scenarios, but is presumed to be generally usable.
The cache can be manually cleared safely at any time that any integrating app is not in operation.
# All ArDrive CLI Commands
```shell
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"types": "./lib/index.d.ts",
"dependencies": {
"ardrive-core-js": "1.10.1",
"ardrive-core-js": "1.11.0",
"arweave": "1.10.18",
"axios": "^0.21.1",
"commander": "^8.2.0",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ __metadata:
"@types/source-map-support": ^0
"@typescript-eslint/eslint-plugin": ^4.18.0
"@typescript-eslint/parser": ^4.18.0
ardrive-core-js: 1.10.1
ardrive-core-js: 1.11.0
arweave: 1.10.18
axios: ^0.21.1
chai: ^4.3.4
Expand All @@ -1564,9 +1564,9 @@ __metadata:
languageName: unknown
linkType: soft

"ardrive-core-js@npm:1.10.1":
version: 1.10.1
resolution: "ardrive-core-js@npm:1.10.1"
"ardrive-core-js@npm:1.11.0":
version: 1.11.0
resolution: "ardrive-core-js@npm:1.11.0"
dependencies:
"@alexsasharegan/simple-cache": ^3.3.3
arbundles: ^0.5.5
Expand All @@ -1584,7 +1584,7 @@ __metadata:
smartweave: ^0.4.45
utf8: ^3.0.0
uuid: ^8.3.2
checksum: 1fa53eb705cf07fdfb705539760ea1abc935f124ea5e4c122e1719019e2a37531a4002bf0f1531935ec7e6739580013cb0c78ef0f359e00f06fe9b6209f95ca0
checksum: d3528d9923bae2b624b6b5963754457db696eaed8063718fcbffd75ec71235efe85f594afd2479a2ecabfc8983ae1e7c9274607ffd7f3af3779628eb061c1cc2
languageName: node
linkType: hard

Expand Down

0 comments on commit 8525568

Please sign in to comment.