Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Faster retrieving with cache mechanism #6

@caryyu

Description

@caryyu

As TM provides the functions of GM_setValue and GM_getValue, which we can leverage directly for cache storage in order to avoid 2nd network consuming that slows down the queries, the consideration should contain:

  • Store object-oriented instances that can be reversed by serialization
  • Expiration mechanism that gives the chance to the end-users to fetch the latest information

This API should be something like:

// milliseconds represents the valid period before meets the expiration date
cache.set(key, obj, milliseconds) 
cache.get(key, default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions