Elderjs / elderjs

Elder.js is an opinionated static site generator and web framework for Svelte built with SEO in mind.
https://elderguide.com/tech/elderjs/
MIT License
2.11k stars 53 forks source link

feat: Configurable Request Cache #220

Closed Catgroove closed 3 years ago

Catgroove commented 3 years ago

When running dynamic routing combined with an edge cache, it does not make much sense to use the built-in request cache provided by ElderJS, especially not when the cache never expires, or when running on a server with limited resources. It results in a server that keeps increasing in memory until it dies.

The PR aims to provide a configurable solution to this problem, by letting users turn off the cache via a setting.

codecov-commenter commented 3 years ago

Codecov Report

Merging #220 (c4a1446) into master (12ecd36) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #220   +/-   ##
=======================================
  Coverage   82.12%   82.12%           
=======================================
  Files          46       46           
  Lines        1958     1958           
  Branches      463      464    +1     
=======================================
  Hits         1608     1608           
  Misses        348      348           
  Partials        2        2           
Impacted Files Coverage Δ
src/utils/validations.ts 77.77% <ø> (ø)
src/routes/prepareRouter.ts 62.02% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 12ecd36...c4a1446. Read the comment docs.

nickreese commented 3 years ago

Also looks like jest doesn't like some of the syntax. Otherwise looks good to me.