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

Implement caching system #80

Closed

Description

@Katsute

Prerequisites

If all checks are not passed then the request will be closed

  • I have checked that no other similar feature request already exists
  • The feature request makes sense for the project

Proposal

Describe the feature that should be added

Implement caching for liveload

https://crunchify.com/how-to-create-a-simple-in-memory-cache-in-java-lightweight-cache/

Reasoning

Explain why this feature should be added

Efficiency and memory.

Activity

  1. self-assigned this
    on Jul 31, 2020
  2. Katsute commented on Sep 19, 2020

    @Katsute
    MemberAuthor

    When a file is first accessed:

    • create a long with the expiry
    • set the timer to a lower number if its lower than current

    When the timer reached end:

    • remove any files that passed expiry
    • if lowest expiry passed reset to next lowest timer

    If a file is reaccesed:

    • reset expiry for that file
  3. added this to the 4.0.0 milestone on Oct 13, 2020
  4. Katsute commented on Oct 17, 2020

    @Katsute
    MemberAuthor

    Update file cache when the last modified time changes.

  5. Katsute commented on Oct 17, 2020

    @Katsute
    MemberAuthor

    A cache byte loading option could require a file cache adapter (and throw illegal args otherwise).

    Parameter can be long millis or double and TimeUnit.

  6. Katsute commented on Oct 18, 2020

    @Katsute
    MemberAuthor

    Instead of a timer instead only clear cache on an exchange.
    Have a long for the closest file expiry and then iterate through each file to clear bytes.

    After read set expiry to -1 then use that to determine if to read file when accessed again.

  7. Katsute commented on Oct 19, 2020

    @Katsute
    MemberAuthor

    A timer will not be used because this would introduce some thread instability with multiple threads.

  8. added a commit that references this issue on Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions