Coder Social home page Coder Social logo

Comments (3)

jaimergp avatar jaimergp commented on June 8, 2024

Can I have more info on this new API, @dholth? I've seen there's a RepodataInterface but that one doesn't check for the cache, right?

Ideally, what I'd like to use is a class (or a method of a class) that:

  • Validates channel name / URL / path
  • Checks if cache exists and is up-to-date.
  • Load it from the cache if the point above is true
  • Download from the remote otherwise, and populate the cache / states
  • It should not attempt to parse the JSON

Do we have such a setup right now?

from conda-libmamba-solver.

dholth avatar dholth commented on June 8, 2024

This API is changing. https://github.com/conda/conda/pull/12090/files#diff-ff8022ba5d08310acbbc6f95e1bc77a53f69e00ffe6daa51026af8880f89612dR362

It's also demonstrated in this new test function https://github.com/conda/conda/blob/features/repodata-jlap/tests/gateways/test_jlap.py#L304 where you can ask SubdirData for the RepoInterface; pass it the state containing cache headers (now a class instead of a bare dict), and sometimes you get a "RepodataOnDisk" exception instead of the parsed json. Yes RepoInterface checks/follows the caching rules. The caller is also responsible for writing the cache headers back to disk though.

What are we trying to accomplish?

Very soon we need to add API to deal with locking correctly, to do all the cache/update saved headers automatically, and to prefer either parsed or not-parsed json (sometimes the cache must parse repodata.json anyway and would otherwise write-to-disk-and-reread) so that the caller can avoid all extra json parsing.

from conda-libmamba-solver.

jaimergp avatar jaimergp commented on June 8, 2024

Closing as part of #59

from conda-libmamba-solver.

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.