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

feat: add Google Cloud Storage cache adapter #891

Closed

Conversation

matheusmatos
Copy link
Contributor

This PR implements Google Cloud Storage as a new cache type.

To use it, you need to configure cache as the example below:

[cache]
# required
type="gcs"
bucket="your_bucket_name"   # Bucket is the name of the GCS bucket to operate on

# optional
basepath="tegola"           # Basepath is a path prefix added to all cache operations inside of the GCS bucket
max_zoom=8                  # MaxZoom determines the max zoom the cache to persist.

The credentials (service account and project_id) are handled by the GOOGLE_APPLICATION_CREDENTIALS environment variable.

@coveralls
Copy link

coveralls commented Nov 28, 2022

Pull Request Test Coverage Report for Build b5a95d2ec-PR-891

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 45.322%

Totals Coverage Status
Change from base Build 01e9eb9a8: 0.0%
Covered Lines: 5745
Relevant Lines: 12676

💛 - Coveralls

Copy link
Member

@ARolek ARolek left a comment

Choose a reason for hiding this comment

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

LGTM! I will get this merged into master once I cut the new version. Thanks for the contribution!

@ARolek
Copy link
Member

ARolek commented Dec 8, 2022

Merged into master! Thank you for the contribution.

@ARolek ARolek closed this Dec 8, 2022
@matheusmatos matheusmatos deleted the @matheusmatos/cache-gcp branch April 25, 2023 14:55
@kolisko
Copy link

kolisko commented Nov 17, 2023

@matheusmatos Thanks! Is possible to set up TTL for gcs cache in config file?

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.

4 participants