Caching and performance
Last updated
Was this helpful?
Last updated
Was this helpful?
cache settings for each (type, source)
pair where sources are compared by reference. Caching ensures a solid performance level: only the first Get call is somewhat expensive while all the subsequent ones are extremely cheap. The cache is automatically updated when the underlying issues new data.
Special care should be taken when using Get and Observe methods with short-lived source instances passed on per-call basis. This could cause poor performance due to cache misses and even lead to cache overflow events. Overflow events may cause violations of . Default cache capacity but can be tuned in provider settings:
This pitfall is easy to fall into as all of the source-related extensions (, , , etc) return decorators that are treated as distinct sources. The only viable solution is to cache these derivative sources.