Skip to content

Add support for caching #72

Description

@trezy

We need to noodle on this one. What it would look like to add caching to HappyView?

Use cases

Cache an XRPC

I have a complex XRPC script. Instead of running it every time it's called, I'd prefer it regenerate every 5 minutes, and always respond with the most recent cached result.

Regenerate cache onn-demand

I want to be able to trigger a cache update from a script. Since I know this type of record will impact the results of the cache, I want to call a method that will force the cache to regenerate.

Open questions

  • How do we store caches?
    • Are they just JSON strings?
    • Do they live in the database? On disk?

Solution

  • happyview.updateCache(CACHE_NAME) (maybe NSID instead of CACHE_NAME?)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions