-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/frontend: add an interface for creating request caches
This change adds a new Cacher interface that is used to create middlewares for caching requests. This abstracts away the use of redis so that the frontend doesn't depend on redis. The tests still depend on redis for the 404 page testing logic, but the 404 page logic will be moved out into a different package so those tests will go too. The Expirer and Middleware interfaces are not present on the Cache function so that the interface can be defined in package internal/frontend without needing the dependency on the Middleware package. For golang/go#61399 Change-Id: I6518b2ed1d772cb4deda3308c4190f0f1b8a35a0 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/514518 kokoro-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]> Run-TryBot: Michael Matloob <[email protected]>
- Loading branch information
Showing
7 changed files
with
49 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters