mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
add note about pinning
This commit is contained in:
parent
afb742109d
commit
9c18dfc161
8
GUIDE.md
8
GUIDE.md
@ -325,6 +325,14 @@ ipfs.on('ready', async () => {
|
||||
})
|
||||
```
|
||||
|
||||
**NOTE ON PERSISTENCY**
|
||||
|
||||
OrbitDB does not automatically pin content added to IPFS. This means that if garbage collection is triggered, any unpinned content will be erased. To pin the entry, pass the optional `{ pin: true }` in the arguments:
|
||||
|
||||
```js
|
||||
await db.put('name', 'hello', { pin: true })
|
||||
```
|
||||
|
||||
For adding entries to other databases, see:
|
||||
- [log.add()](https://github.com/orbitdb/orbit-db/blob/master/API.md#addevent)
|
||||
- [feed.add()](https://github.com/orbitdb/orbit-db/blob/master/API.md#adddata)
|
||||
|
Loading…
x
Reference in New Issue
Block a user