Skip to content

Fix URI cache to cache URIs across multiple files #348

Closed

Description

@MichaIng

As tested here, the URI cache for caching URI check results across all input files, does not work as expected.

There is a test for repetition in a single file: https://github.com/lycheeverse/lychee/blob/master/lychee-bin/tests/cli.rs#L218-L229
But this worked before the new URI cache was implemented. This test may be extended to use two identical files.
@mre
Is it actually intended that two identical URLs in two separate files contribute only 1 to the total of the summary, or is it still 1 per input (and only the actual request skipped internally)? In the latter case, expanding or implementing the test would be more difficult.

Activity

  1. mre commented on Sep 30, 2021

    @mre
    Member

    The cache should work across files. At least that's the goal. So the same link should always only count as 1 in the total, no matter in how many files it occurs.

  2. MichaIng commented on Sep 30, 2021

    @MichaIng
    MemberAuthor

    Okay great, I'll try to extend the cache accordingly.

  3. MichaIng commented on Sep 30, 2021

    @MichaIng
    MemberAuthor

    PR up: #349
    I hope I did the syntax right 😅.

  4. changed the title [-]Fix URI cache do cache URIs across multiple files[/-] [+]Fix URI cache to cache URIs across multiple files[/+] on Sep 30, 2021
  5. mre commented on Nov 22, 2021

    @mre
    Member

    Current status: Caching across files is currently disabled. See test_caching_across_files.
    We're planning to bring this back at some point.
    #349 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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