Giter Site home page Giter Site logo

Data caching issue about pybroker HOT 4 CLOSED

ASDWQad avatar ASDWQad commented on June 20, 2024
Data caching issue

from pybroker.

Comments (4)

edtechre avatar edtechre commented on June 20, 2024 1

Thanks @tsunamilx, I am not aware of any cache limit. I will need to test this myself and report back.

from pybroker.

edtechre avatar edtechre commented on June 20, 2024

Hi @ASDWQad,

You should be able to reuse the existing cache mechanism by extending DataSourceCacheMixin. Can you post your code here?

from pybroker.

tsunamilx avatar tsunamilx commented on June 20, 2024

Hi @edtechre

I have another question about the cache:
When I query for some small amount of symbols (like 100), the cache works, but when I query for large amount of symbols (like 1000), it always calls the fetch function (meaning cache is not used). Is there any limit on the cache (like max size limit) so that the early data is being evicted?

And when I query the 1000 symbols one by one, it actually loads everything from cache.

# querying 1000 symbols at once fails the cache
d = ds.query(symbols, start, end, timeframe)

# querying 1000 symbols one by one works
for s in symobls:
  d = ds.query(s, start, end, timeframe)

from pybroker.

edtechre avatar edtechre commented on June 20, 2024

Hi @tsunamilx,

Looking at the code, there is no difference between calling query with all symbols or individually for each symbol. See data.py.

Perhaps your cache was invalidated somehow?

from pybroker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.