We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f23389d + 97e8ec6 commit 64fc605Copy full SHA for 64fc605
govtool/backend/src/VVA/API.hs
@@ -407,7 +407,13 @@ listProposals selectedTypes sortMode mPage mPageSize mDrepRaw mSearchQuery = do
407
408
CacheEnv {proposalListCache} <- asks vvaCache
409
410
- proposals <- cacheRequest proposalListCache () (Proposal.listProposals mSearchQuery)
+ let cacheKey = ()
411
+
412
+ proposals <- do
413
+ result <- Proposal.listProposals mSearchQuery
414
+ if null result
415
+ then return result
416
+ else cacheRequest proposalListCache cacheKey (pure result)
417
418
mappedSortedAndFilteredProposals <- mapSortAndFilterProposals selectedTypes sortMode proposals
419
let filteredProposals = filter
0 commit comments