Documentation ¶
Overview ¶
Package s3cache provides an implementation of httpcache.Cache that stores and retrieves data using Amazon S3.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { // Config is the Amazon S3 configuration. Config s3util.Config // BucketURL is the URL to the bucket on Amazon S3, which includes the // bucket name and the AWS region. Example: // "https://s3-us-west-2.amazonaws.com/mybucket". BucketURL string // Gzip indicates whether cache entries should be gzipped in Set and // gunzipped in Get. If true, cache entry keys will have the suffix ".gz" // appended. Gzip bool }
Cache objects store and retrieve data using Amazon S3.
func New ¶
New returns a new Cache with underlying storage in Amazon S3. The bucketURL is the full URL to the bucket on Amazon S3, including the bucket name and AWS region (e.g., "https://s3-us-west-2.amazonaws.com/mybucket").
The environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_KEY are used as the AWS credentials. To use different credentials, modify the returned Cache object or construct a Cache object manually.
Click to show internal directories.
Click to hide internal directories.