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

stale #849

Merged
merged 21 commits into from
Jan 30, 2023
Merged

stale #849

merged 21 commits into from
Jan 30, 2023

Conversation

jycouet
Copy link
Contributor

@jycouet jycouet commented Jan 25, 2023

Fixes #287

Adding stale mechanism. with

To help everyone out, please make sure your PR does the following:

  • Update the first line to point to the ticket that this PR fixes
  • Add a message that clearly describes the fix
  • If applicable, add a test that would fail without this fix
  • Make sure the unit and integration tests pass locally with pnpm run tests and cd integration && pnpm run tests
  • Includes a changeset if your fix affects the user with pnpm changeset

@changeset-bot
Copy link

changeset-bot bot commented Jan 25, 2023

🦋 Changeset detected

Latest commit: 638e751

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
houdini Minor
houdini-plugin-svelte-global-stores Minor
houdini-react Minor
houdini-svelte Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jan 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 30, 2023 at 9:48AM (UTC)
docs-next ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 30, 2023 at 9:48AM (UTC)

Copy link
Collaborator

@AlecAivazis AlecAivazis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks realllly good! Nice job 💪

Just some small nitpicks and reminders for us to talk about later 👍

packages/houdini/src/runtime/public/record.ts Outdated Show resolved Hide resolved
/**
* Specifies after how long a data goes stale in miliseconds. (default: `undefined`)
*/
defaultTimeToStale?: number
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder for me to think about this name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To bring even more things in mind, it would be cool to have:

{
  stale: {
    defaultTimeToStale: number | undefined
    type: {
      User: number | undefined
      ...
    }
  }
}

e2e/sveltekit/src/routes/stale/add/+page.svelte Outdated Show resolved Hide resolved
packages/houdini/src/runtime/cache/cache.ts Outdated Show resolved Hide resolved
packages/houdini/src/runtime/public/cache.ts Outdated Show resolved Hide resolved
packages/houdini/src/runtime/public/tests/record.test.ts Outdated Show resolved Hide resolved
@AlecAivazis AlecAivazis merged commit c7d4008 into next Jan 30, 2023
@AlecAivazis AlecAivazis deleted the feat/stale-v3 branch January 30, 2023 09:54
AlecAivazis added a commit that referenced this pull request Feb 10, 2023
* 🚧 UPDATE: stale v2 to v3 ^^

* 🚸 UPDATE: with TODOs

* 👌 FIX: with feedback v0

* ⚡ IMPROVE: stale story

* rename defaultTimeToStale to defaultLifetime

* add garbage collection

* linter

* tests pass

* consolidate cache methods

* fix syntax issue

* unused import

* tests pass

* grammar

* add stale section to cache guide

* link

* fix link

* changeset

* remove unused tests

* clean up links file

---------

Co-authored-by: Alec Aivazis <[email protected]>
AlecAivazis added a commit that referenced this pull request Feb 10, 2023
* 🚧 UPDATE: stale v2 to v3 ^^

* 🚸 UPDATE: with TODOs

* 👌 FIX: with feedback v0

* ⚡ IMPROVE: stale story

* rename defaultTimeToStale to defaultLifetime

* add garbage collection

* linter

* tests pass

* consolidate cache methods

* fix syntax issue

* unused import

* tests pass

* grammar

* add stale section to cache guide

* link

* fix link

* changeset

* remove unused tests

* clean up links file

---------

Co-authored-by: Alec Aivazis <[email protected]>
@AlecAivazis AlecAivazis mentioned this pull request Feb 10, 2023
endigma pushed a commit to endigma/houdini that referenced this pull request Nov 10, 2024
* 🚧 UPDATE: stale v2 to v3 ^^

* 🚸 UPDATE: with TODOs

* 👌 FIX: with feedback v0

* ⚡ IMPROVE: stale story

* rename defaultTimeToStale to defaultLifetime

* add garbage collection

* linter

* tests pass

* consolidate cache methods

* fix syntax issue

* unused import

* tests pass

* grammar

* add stale section to cache guide

* link

* fix link

* changeset

* remove unused tests

* clean up links file

---------

Co-authored-by: Alec Aivazis <[email protected]>
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.

Add way to mark data as stale/invalid
2 participants