Skip to content

Extend PHP client to add caching and authentication #2

Description

@ken-duck

Add a couple of features to the MVP client

Caching

  • Cache results to disk for 12 hours, so if the same package is scanned more than once it does not check OSS Index
  • Before requesting results from OSS Index for a package, see if the cached results are valid
  • If a plug-and-play caching algorithm cannot be found, do not implement caching

Rate limits

  • Reads an optional username/token from a configuration file on disk which is passed via the OSS Index API to allow use of an authenticated request which has a less restrictive rate limit
  • Gracefully handles a rate limit by informing the user that it has be exceeded
    • If the user is unauthenticated, mention that authenticated users have a higher rate limit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions