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

Simplify processing args #154

Merged

Conversation

julienduchesne
Copy link
Member

Instead of carrying a cache and vm around on each function, create a Processor struct to contain those

Instead of carrying a `cache` and `vm` around on each function, create a `Processor` struct to contain those
Copy link
Member

@Duologic Duologic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@julienduchesne julienduchesne merged commit 8a00f52 into julienduchesne/global-cache Aug 26, 2024
4 checks passed
@julienduchesne julienduchesne deleted the julienduchesne/processor-instance branch August 26, 2024 01:05
julienduchesne added a commit that referenced this pull request Aug 26, 2024
* Global cache for documents + top level jsonnet objects
Closes #133

There are two caches currently:
- One for protocol documents. This one is instantiated by the server and maintained up-to-date as documents are opened, changed, and closed.
- One for jsonnet objects. This one is a global var and is only added to. Modified objects are never removed/modified from the cache.

By merging the two caches, we can expand the first cache's behavior to also invalidate modified objects from the global cache when a document is changed.

* Simplify processing args (#154)

Instead of carrying a `cache` and `vm` around on each function, create a `Processor` struct to contain those

* Fix linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants