Better cache invalidation for custom, local generators
See original GitHub issueFollows https://github.com/thesamet/sbt-protoc/pull/162
How can we accurately fingerprint protoc-bridge
local (defined in the meta-build) generators behind PB.targets
, to avoid false positive cache hits on local workspaces ~as ScalaPB/sbt-akka-grpc gets bumped for example~?
Looking up a potential serialVersionUID
on Generator
would allow generators to declare their version, but it leaves that responsibility to the generator author to bump this… ~I can’t think of any other way - maybe something related to JAR timestamps?~
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Caching and invalidation have never been so easy - GitHub
The package supports tag-based cache invalidation and better works with Django, ... it's # better to write custom cache key generator in such...
Read more >Cache Invalidation — VQL Guide - Community | Denodo
The cache of a view can be invalidated using the ALTER VQL sentence (see section Modifying a Derived View). There are two types...
Read more >Configuring Infinispan caches
If a cache is configured for invalidation, every time data is changed in a cache, other caches in the cluster receive a message...
Read more >GenerateSwaggerCode task does not invalidate local cache ...
I'm running gradle-swagger-generator-plugin GenerateSwaggerCode task on an input yaml that contains a $refs to another file.
Read more >Application Data Caching - Quarkus
This key generator is not a CDI bean. 4, The @CacheKey annotation will be ignored when the foo cache data is invalidated, but...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I recently wrote a guide that tries to consolidate the best practices and all magic involved in writing plugins: https://scalapb.github.io/docs/writing-plugins
It comes with an sbt plugin, as well as a g8 template to get projects set up correctly. This is used in scalapb-validate and zio-grpc.
Specifically, to run plugins to run from a local project, it provides codeGenClassPath and genModule. Currently it re-generates sources on any compile, but the improvement we identified above can go in here.
Thanks for trying this! Right, when writing this plugin I had in mind projects like ScalaPB/zio-grpc/scalapb-validate which are meant to produce a protoc plugin and have one or two e2e projects to verify it. Will gladly accept PRs that improve performance and how classloader caching is done.