https://github.com/jamesponddotco/pagecache-go
[READ-ONLY] Stable interface and helpers for caching HTTP responses.
https://github.com/jamesponddotco/pagecache-go
cache caching go http http-cache memory-cache mockingjay
Last synced: 10 months ago
JSON representation
[READ-ONLY] Stable interface and helpers for caching HTTP responses.
- Host: GitHub
- URL: https://github.com/jamesponddotco/pagecache-go
- Owner: jamesponddotco
- License: mit
- Created: 2023-04-09T19:23:34.000Z (almost 3 years ago)
- Default Branch: trunk
- Last Pushed: 2023-05-01T19:47:43.000Z (over 2 years ago)
- Last Synced: 2025-03-07T00:52:09.431Z (10 months ago)
- Topics: cache, caching, go, http, http-cache, memory-cache, mockingjay
- Language: Go
- Homepage: https://sr.ht/~jamesponddotco/pagecache-go/
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# pagecache
[](https://godocs.io/git.sr.ht/~jamesponddotco/pagecache-go)
[](https://goreportcard.com/report/git.sr.ht/~jamesponddotco/pagecache-go)
[](https://builds.sr.ht/~jamesponddotco/pagecache-go?)
> **Note**: This library is under active development and most pieces
> haven't been tested yet. **Do not use in production** until a tagged
> release is out.
Package `pagecache` provides a stable interface and helpers for caching HTTP responses.
## Features
- Stable cache interface.
- Simple and easy-to-use API.
- Multiple helpers, making implementation easier.
### `pagecache.Cache` implementations
The `pagecace` package itself only provides a cache interface and helper
functions for users who wish to implement that interface. You can either
use an implementation created by someone else or write your own.
**Implementations**
- [`memorycachex`](https://git.sr.ht/~jamesponddotco/pagecache-go/tree/trunk/item/memorycachex)
provides a thread-safe in-memory cache using the
[Mockingjay](https://en.wikipedia.org/wiki/Cache_replacement_policies#Mockingjay)
cache replacement policy.
If you wrote a `pagecache.Cache` implementation and wish it to be linked
here, [please send a patch](https://git.sr.ht/~jamesponddotco/pagecache-go#resources).
## Installation
To install `pagecache` alone, run:
```sh
go get git.sr.ht/~jamesponddotco/pagecache-go
```
## Contributing
Anyone can help make `pagecache` better. Check out [the contribution
guidelines](https://git.sr.ht/~jamesponddotco/pagecache-go/tree/master/item/CONTRIBUTING.md)
for more information.
## Resources
The following resources are available:
- [Package documentation](https://godocs.io/git.sr.ht/~jamesponddotco/pagecache-go).
- [Support and general discussions](https://lists.sr.ht/~jamesponddotco/pagecache-discuss).
- [Patches and development related questions](https://lists.sr.ht/~jamesponddotco/pagecache-devel).
- [Instructions on how to prepare patches](https://git-send-email.io/).
- [Feature requests and bug reports](https://todo.sr.ht/~jamesponddotco/pagecache).
---
Released under the [MIT License](LICENSE.md).