mirror of
https://github.com/google/nomulus.git
synced 2025-07-24 19:48:32 +02:00
Read from bloom filter for premium pricing checks
This also cleans up the PremiumList API so that it only has one method for checking premium prices, which is by TLD, rather than two. I will be refactoring a lot of the static methods currently residing in the PremiumList class into a separate utils class, but I don't want to include too many changes in this one CL. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=148475345
This commit is contained in:
parent
3ac74fa449
commit
3ca9bb6aeb
18 changed files with 328 additions and 282 deletions
|
@ -1135,6 +1135,13 @@ public final class RegistryConfig {
|
|||
return Duration.standardSeconds(CONFIG_SETTINGS.get().caching.singletonCachePersistSeconds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum number of premium list entries across all TLDs to keep in in-memory cache.
|
||||
*/
|
||||
public static int getStaticPremiumListMaxCachedEntries() {
|
||||
return CONFIG_SETTINGS.get().caching.staticPremiumListMaxCachedEntries;
|
||||
}
|
||||
|
||||
/** Returns the email address that outgoing emails from the app are sent from. */
|
||||
public static String getGSuiteOutgoingEmailAddress() {
|
||||
return CONFIG_SETTINGS.get().gSuite.outgoingEmailAddress;
|
||||
|
|
|
@ -91,6 +91,7 @@ public class RegistryConfigSettings {
|
|||
public int singletonCacheRefreshSeconds;
|
||||
public int domainLabelCachingSeconds;
|
||||
public int singletonCachePersistSeconds;
|
||||
public int staticPremiumListMaxCachedEntries;
|
||||
}
|
||||
|
||||
/** Configuration for Registry Data Escrow (RDE). */
|
||||
|
|
|
@ -115,6 +115,14 @@ caching:
|
|||
# Length of time that a long-lived singleton in persist mode should be cached.
|
||||
singletonCachePersistSeconds: 31557600 # This is one year.
|
||||
|
||||
# Maximum total number of static premium list entry entities to cache in
|
||||
# memory, across all premium lists for all TLDs. Tuning this up will use more
|
||||
# memory (and might require using larger App Engine instances). Note that
|
||||
# premium list entries that are absent are cached in addition to ones that are
|
||||
# present, so the total cache size is not bounded by the total number of
|
||||
# premium price entries that exist.
|
||||
staticPremiumListMaxCachedEntries: 200000
|
||||
|
||||
rde:
|
||||
# URL prefix of ICANN's server to upload RDE reports to. Nomulus adds /TLD/ID
|
||||
# to the end of this to construct the full URL.
|
||||
|
|
|
@ -17,6 +17,7 @@ caching:
|
|||
singletonCacheRefreshSeconds: 0
|
||||
domainLabelCachingSeconds: 0
|
||||
singletonCachePersistSeconds: 0
|
||||
staticPremiumListMaxCachedEntries: 50
|
||||
|
||||
braintree:
|
||||
merchantAccountIdsMap:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue