L
L
LinuxGod2020-09-26 14:50:15
caching
LinuxGod, 2020-09-26 14:50:15

How to disable IPFS caching?

Doooobry day, faced here with such task.

I upload a file, and then I look at its contents:

ipfs add file1.txt

added QmfM2r8seH2GiRaC4esTjeraXEachRt8ZsSeGaWTPLyMoG file1.txt

ipfs cat QmfM2r8seH2GiRaC4esTjeraXEachRt8ZsSeGaWTPLyMoG
Hello World!

I need to delete this file:
ipfs pin rm QmfM2r8seH2GiRaC4esTjeraXEachRt8ZsSeGaWTPLyMoG
unpinned QmfM2r8seH2GiRaC4esTjeraXEachRt8ZsSeGaWTPLyMoG


But I can access the file by hash even after I deleted it:
ipfs cat QmfM2r8seH2GiRaC4esTjeraXEachRt8ZsSeGaWTPLyMoG
Hello World!

I think that this file is cached somewhere, because after cleaning the garbage the file ceases to exist:
ipfs repo gc
removed QmQhTJQeV3xscXJkrEGLTMoDXxrVLUFcBFiHHpMjdbsP5e
removed QmfM2r8seH2GiRaC4esTjeraXEachRt8ZsSeGaWTPLyMoG
removed QmdQsT5jhjqpjE3MvaJB5w2igQEMrFnXFHXkoFzFRu9Zbg
removed QmXXusDYz6krXwfXW5AkCL7CHKDRK7xQSZstUodnCPgPsf


ipfs cat QmfM2r8seH2GiRaC4esTjeraXEachRt8ZsSeGaWTPLyMoG
ничего не выводит - файла нет

Question:
How can I disable this caching? I would not like to clean up the garbage with the command every time or wait until the cache itself is deleted. It is required to make sure that the entire file is deleted at once and does not remain anywhere. (not on one of my private network nodes)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
loskiq, 2021-02-01
@LinuxGod

after you 'pin' this file, it will be stored in the cache for some time, and then it will be deleted by itself. You can enable automatic garbage collection and specify the time after which it will be activated.
https://docs.ipfs.io/concepts/persistence/#garbage...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question