Skip to content

How does cache get refresh? #1575

Answered by cjdsellers
HeidXC asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @VeraLyu

The cache is rather simple, for each data type there is just a deque per instrument (or bar type for bars) - with a default length of 10_000 (configurable).

When you make a request for historical ticks (or bars), the deque is replaced by them on arrival, otherwise as each tick (or bar) hits the DataEngine the tick is added to the Cache, which appends to the left side of the queue, and will eventually fall off the right end as more are added.

I think for a simple use case where you just want to maintain a hot cache of the most recent data, then what's built in will work for you. Notably though, the data is not persisted in the cache (generally only execution data is persisted,…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@HeidXC
Comment options

Answer selected by HeidXC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants