Skip to content

add subscription based cache refresh #2

@ghost

Description

add subscription based cache refresh.

The current design is optimisic and friendly, it assumes that nobody will spam cache_nft for invalid CIDs.

subscribe specifies the port and protocol used for a callback, the ip address is implied.

unsubscribe removed the ip address from the callback.

has_template_cached returns true if a specific nft template is already cached, based on a CID.
this will internally call get_nft_template_list, which lists all known templates.

cache_template instructs the node to cache a specific nft template, based on a CID.
this will internally call get_nft_template_owner, which caches all template related information.

  • add subscribe {"action": "subscribe", "protocol":"^http|https$", "port":"^[0-9'+$"}
  • add unsubscribe {"action": "unsubscribe"}
  • add has_template_cached {"action": "has_template_cached", "cid", "<cid>"}
  • add cache_template {"action": "cache_template", "cid", "<cid>"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions