Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Module #7

Open
1 task done
PSchmiedmayer opened this issue Jun 13, 2023 · 0 comments
Open
1 task done

Cache Module #7

PSchmiedmayer opened this issue Jun 13, 2023 · 0 comments
Labels
module Larger issues that will be manifested in separate new modules

Comments

@PSchmiedmayer
Copy link
Member

PSchmiedmayer commented Jun 13, 2023

Use Case

Different applications require the downloading or larger amounts of data from web services that should be cached on the device. Caching reduces the amount of data loaded from web services, reduces the latency on subsequent loads, and improves the user experience.

Problem

The Spezi ecosystem should provide a simple caching module that allows developers to easily cache and retrieve data in accordance with the caching mechanisms established in the operating system.

Solution

The Caching component should ...

  1. Provide mechanisms to easily retrieve values using a unique path, e.g., the URL where the content was downloaded from.
  2. The cache should have the possibility to invalidate elements manually or after a specified time that can be configured on the component-basis.
  3. Subsequent requests for a non-cached element that are requested while a network request is processed should be enqueued and all subsequently fulfilled once the download is complete or fail when the download cannot be completed.
  4. The cache should be located in the caches directory of the application to allow the operating system to quickly clean the cache if it runs out of memory.

Additional context

The API should take advantage of existing programming language features such as async/await and structured concurrency to enable callers to wait for the result and transparently load elements with additional context beyond, e.g., a URL Session request.

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@PSchmiedmayer PSchmiedmayer added the enhancement New feature or request label Jun 13, 2023
@PSchmiedmayer PSchmiedmayer added module Larger issues that will be manifested in separate new modules and removed enhancement New feature or request labels Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module Larger issues that will be manifested in separate new modules
Projects
Status: Focus Areas
Development

No branches or pull requests

1 participant