Skip to content

Commit

Permalink
docs: comment cache layer
Browse files Browse the repository at this point in the history
  • Loading branch information
oddgrd committed Feb 22, 2023
1 parent 227bba3 commit 84d12a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gateway/src/api/cache_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ impl CacheManagement for CacheManager {
}
}

/// The purpose of this layer is to cache the returned JWT token returned by calls to
/// the auth endpoints that convert a cookie/api-key to a JWT: '/auth/key' and '/auth/session'.
/// The layer will first check if the key/cookie-id is cached, if it is return it, if it isn't
/// let the request go through, extract the JWT on the way back and cache it.
#[derive(Clone)]
pub(crate) struct CacheLayer<F> {
pub(crate) cache_manager: Arc<Box<dyn CacheManagement>>,
Expand Down

0 comments on commit 84d12a9

Please sign in to comment.