mirror of
https://github.com/google/nomulus
synced 2026-07-28 19:12:46 +00:00
Add a 1-hour expiration to all Objectify memcache uses
This protects us from the edge case of potentially stale memcache data due to a DeadlineExceededExeption, or possibly from MemcacheServiceException. If memcache gets stale and misses a write that went to Datastore, it will catch up in at most one hour. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=116174023
This commit is contained in:
@@ -17,6 +17,7 @@ package com.google.domain.registry.model.index;
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Strings.isNullOrEmpty;
|
||||
import static com.google.domain.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static com.google.domain.registry.model.ofy.Ofy.RECOMMENDED_MEMCACHE_EXPIRATION;
|
||||
import static com.google.domain.registry.util.CollectionUtils.isNullOrEmpty;
|
||||
import static com.google.domain.registry.util.DateTimeUtils.latestOf;
|
||||
|
||||
@@ -43,7 +44,7 @@ import javax.annotation.Nullable;
|
||||
* necessary to query them explicitly from Datastore.
|
||||
*/
|
||||
@Entity
|
||||
@Cache
|
||||
@Cache(expirationSeconds = RECOMMENDED_MEMCACHE_EXPIRATION)
|
||||
public class DomainApplicationIndex extends BackupGroupRoot {
|
||||
|
||||
@Id
|
||||
|
||||
Reference in New Issue
Block a user