Commit graph

2 commits

Author SHA1 Message Date
Dayllan Maza
cc71a3bac8 block: Add type hints
Follow-Up: I7639766519861690a759629144c8680767539293
Change-Id: If3693c744e7faeb533cd44f7cdb10fb79257b71c
2023-10-16 08:31:24 -04:00
Tim Starling
03ceb372b3 Add cache to BlockManager
Add a cache to BlockManager, so that we can get rid of the block cache in
User.

The cache stores up to three blocks -- a request block, a user block and
an anonymous (IP) block. Using object identity to compare keys means
that we can avoid serializing the WebRequest and UserIdentity.

Bug: T345683
Change-Id: I7639766519861690a759629144c8680767539293
2023-10-12 13:42:58 +11:00