Skip to content

Isolate and refactor caching logic - #94

Merged
saswatamcode merged 9 commits into
bwplotka:mainfrom
douglascamata:douglascamata/refactor-cache-settings
Aug 4, 2023
Merged

saswatamcode merged 9 commits into
bwplotka:mainfrom
douglascamata:douglascamata/refactor-cache-settings

Conversation

@douglascamata

@douglascamata douglascamata commented Jul 29, 2022 •

Copy link
Copy Markdown
Contributor

Signed-off-by: Douglas Camata 159076+douglascamata@users.noreply.github.com

The cache logic has been moved to its own package.

The refactor improves on:

  • Using a typed string for the cache type, to provide some additional safety.
  • Makes it harder to access the underlying string fields of configuration options that are time durations to, to help avoiding mistakes.

Breaking change

  • This PR changes the SQLite cache type configuration option from SQLite to sqlite. Helps avoid issues with upper/lower case mistakes.

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
@douglascamata
douglascamata marked this pull request as draft July 29, 2022 15:51
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
@douglascamata
douglascamata marked this pull request as ready for review July 29, 2022 16:22

@bwplotka bwplotka left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks! Some nits, otherwise LGTM

Comment thread pkg/cache/config.go Resolved
Comment thread pkg/cache/config.go Resolved
Comment thread pkg/cache/config.go Resolved
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
…uglascamata/mdox; branch 'main' of github.com:bwplotka/mdox into douglascamata/refactor-cache-settings

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
@douglascamata

Copy link
Copy Markdown
Contributor Author

@bwplotka feedback taken care of. 👍 🎉

@douglascamata
douglascamata requested a review from bwplotka July 7, 2023 15:22

@saswatamcode saswatamcode left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@saswatamcode
saswatamcode merged commit 8e03ce0 into bwplotka:main Aug 4, 2023
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.

3 participants

⌂ 换网址