ipfs / ipfs/kubo

feature request: time limit (timeout) for pinned files and directories

Open
#1,718 10 comments 0 reactions 0 assignees View on GitHub
kind/enhancement need/community-input
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

Two additions are suggested:
- a flag `--timeout=...` for the command `ipfs pin add` (for example, `ipfs pin add -r someDir --timeout=3y5mo2w8d13h23mi05s` sets the timeout that consists of 3 years, 5 months, 2 weeks, 8 days, 13 hours, 23 minutes and five seconds);
- an additional command (such as `ipfs pin purge`) that acts like `ipfs pin rm` for items with expired timeouts.

Pros:
- A web site that decides to erase some old content would be able instead to decide to hold that content pinned for a week in IPFS (by running `ipfs pin add -r oldContent --timeout=1w` and then adding `ipfs pin purge` to its crontab) after deletion; that site wound also need to change (immediately) all internal hyperlinks to IPFS URLs where they were previously leading to that deleted content. Such action would allow some interested readers to hold copies in their local IPFS instances. The site then purges the content and gets the necessary storage space available on host, but that old content continues to be available in IPFS.
- Alternatively, a web site may decide that some content (images and video, for example) is to be stored in IPFS from the very beginning (but set some timeout for hosting those files pinned in the site's own IPFS local storage). Afterwards the content continues to be available in IPFS as long as the readers actually need it (in their IPFS caches or even pinned by them).

Cons:
- If a clock goes wrong on a system, then some media becomes purged prematurely.

Stretch goals:
- An additional command to reset or change the timeout of a known pinned file.
- A social button that indicates how many IPFS-hosting readers support the global availability of some published material by pinning it themselves before or after its timeout on its initial hosting. “45 likes, 37 retweets, 24 IPFS pins.”

[![(45 likes)](https://img.shields.io/badge/%F0%9F%91%8D_Like-45-green.svg?style=social)](https://img.shields.io/badge/%F0%9F%91%8D_Like-45-green.svg?style=social)   [![(retweets)](https://img.shields.io/twitter/url/https/ipfs.io.svg?style=social)](https://img.shields.io/twitter/url/https/ipfs.io.svg?style=social)   [![(24 IPFS pins)](https://img.shields.io/badge/%F0%9F%93%8C_IPFS_pins-24-green.svg?style=social)](https://img.shields.io/badge/%F0%9F%93%8C_IPFS_pins-24-green.svg?style=social)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.