mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Clarify when to use cache (or not) when loading premium lists
You don't want to use the cache when loading them for the purposes of updating them, but you definitely do still want to use the cache when checking the price of individual domains. In [] the cache clearing of premium lists on update was removed. This is a good thing in aggregate because the cache is per-instance and thus misleading, but it also caused us to not be able to update the same premium list twice within an hour because the second update would hit a "PremiumList was concurrently edited" exception, owing to first loading the stale version from the cache for the purposes of updating it. Now we bypass the cache for that purpose. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=197768142
This commit is contained in:
parent
fc60890136
commit
8f456bcf64
11 changed files with 44 additions and 48 deletions
|
@ -362,8 +362,9 @@ abstract class CreateOrUpdateTldCommand extends MutatingCommand {
|
|||
|
||||
if (premiumListName != null) {
|
||||
if (premiumListName.isPresent()) {
|
||||
Optional<PremiumList> premiumList = PremiumList.get(premiumListName.get());
|
||||
checkArgument(premiumList.isPresent(),
|
||||
Optional<PremiumList> premiumList = PremiumList.getUncached(premiumListName.get());
|
||||
checkArgument(
|
||||
premiumList.isPresent(),
|
||||
String.format("The premium list '%s' doesn't exist", premiumListName.get()));
|
||||
builder.setPremiumList(premiumList.get());
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue