question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to detect if cached composition data is obsolete?

See original GitHub issue

Let’s say my main assembly has version 1.0.1.0. I serialize its composition data to disk:

await cacheManager.SaveAsync(configuration, stream);

Then I update my assembly version to 1.0.2.0. Finally, I successfully (and a bit unexpectedly) deserialize the composition data from the previously saved cache:

var epf = await cacheManager.LoadExportProviderFactoryAsync(stream, resolver);

I expected this to fail, since the version has changed. Viewing the serialized data, I can see the old version number lurking around. Running the application seems to work, but I guess there could have been a problem if the dependencies had changed.

Not sure how to interpret these findings. What is the expected behavior, and why?

More importantly, is it possible to detect if a serialized cache is obsolete?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
znakeeyecommented, Jun 10, 2019

Thanks. I decided to serialize the scanned assembly timestamps together with the graph data. If the timestamps differs, the cache is invalidated.

0reactions
AArnottcommented, Aug 16, 2019

I agree. But the cache should be built on every build, so if the developer adds an Export, on the very next test run or debug launch they’ll be running with the new cache.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to inform remote users a cached data is out of date?
First thing to do is to include the expiration / valid till date along with the data response. Second thing to do is...
Read more >
cache - Can we programatically verify the Lightning ...
As I see it, that inconsistency is due to data being pulled from Cache, but not server side. And it seems, I need...
Read more >
Data fetching and caching with SWR and Vue.js
Stale means that the data in the cache is outdated. Revalidate means to get a fresh copy of the data from the remote...
Read more >
Optimize Data For Your Use Cases Using Hot Cache
This article is going to cover caching architecture patterns, that may help to prevent performance issues. Wikipedia states that "cache is a hardware...
Read more >
Memory and storage in After Effects
This is helpful when trying to determine which layers are cached in a composition. Enable the Layer Cache Indicators option by pressing Ctrl...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found