Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a gc for size and expiry #7

Merged
merged 6 commits into from
Sep 4, 2022
Merged

Adds a gc for size and expiry #7

merged 6 commits into from
Sep 4, 2022

Conversation

andrewaylett
Copy link
Owner

Uses cache-control max-age and the age header to work out when to expire entries

Signed-off-by: Andrew Aylett andrew@aylett.co.uk

There's a _lot_ more I could do with this, need to avoid wanting it to
be perfect before merging.  Needs more high-level tests, though.

Signed-off-by: Andrew Aylett <andrew@aylett.co.uk>
This makes it easier to test validity, I'm really enjoying being able to
have nicely typed custom matchers.

Signed-off-by: Andrew Aylett <andrew@aylett.co.uk>
Also factors in a supplier for the current instant, so I can override it
in tests, and factors out expect extensions into a separate package for
the mechanics and separate files for the extensions in use in this
project.

Signed-off-by: Andrew Aylett <andrew@aylett.co.uk>
We don't want Jest to run built tests, nor to include them in the
package.  But we do want our tooling to type check the source.

Signed-off-by: Andrew Aylett <andrew@aylett.co.uk>
Signed-off-by: Andrew Aylett <andrew@aylett.co.uk>
JS and TS are formatted with Prettier, which works off editorconfig
configuration, but doesn't _always_ indent by a multiple of the
configured value for ternaries or block comments.

Prettier is doing the right thing, so leave it to it.

Signed-off-by: Andrew Aylett <andrew@aylett.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant