<commit_before>package org.sagebionetworks.bridge.cache;

import java.util.List;
import java.util.Objects;

import org.sagebionetworks.bridge.models.accounts.Phone;
import org.sagebionetworks.bridge.models.accounts.SignIn;
import org.sagebionetworks.bridge.models.studies.StudyIdentifier;
import org.sagebionetworks.bridge.models.subpopulations.SubpopulationGuid;

import com.google.common.base.Joiner;
import com.google.common.collect.Lists;

/**
 * A utility to provide consistency, centralization, and type safety for the keys we use 
 * to store data in Redis. This makes it easier to determine which keys can be returned as 
 * part of the administrative API so we can keep PII data out of the cache keys we return.
 */
public final class CacheKeys {
    
    private static final Joiner COLON_JOINER = Joiner.on(":");
    private static final String[] PUBLIC_KEYS = new String[] {
        "AppConfigList", "channel-throttling", "lock", "study", "Subpopulation", "SubpopulationList"};
    
    public final static boolean isPublic(String key) {
        for (String suffix : PUBLIC_KEYS) {
            if (key.endsWith(":"+suffix)) {
                return true;
            }
        }
        return false;
    }
    <commit_msg>Making one more key accessible through cache API, as I had documented on the factory method.<commit_after>package org.sagebionetworks.bridge.cache;

import java.util.List;
import java.util.Objects;

import org.sagebionetworks.bridge.models.accounts.Phone;
import org.sagebionetworks.bridge.models.accounts.SignIn;
import org.sagebionetworks.bridge.models.studies.StudyIdentifier;
import org.sagebionetworks.bridge.models.subpopulations.SubpopulationGuid;

import com.google.common.base.Joiner;
import com.google.common.collect.Lists;

/**
 * A utility to provide consistency, centralization, and type safety for the keys we use 
 * to store data in Redis. This makes it easier to determine which keys can be returned as 
 * part of the administrative API so we can keep PII data out of the cache keys we return.
 */
public final class CacheKeys {
    
    private static final Joiner COLON_JOINER = Joiner.on(":");
    private static final String[] PUBLIC_KEYS = new String[] { "emailVerificationStatus", "AppConfigList",
            "channel-throttling", "lock", "study", "Subpopulation", "SubpopulationList" };
    
    public final static boolean isPublic(String key) {
        for (String suffix : PUBLIC_KEYS) {
            if (key.endsWith(":"+suffix)) {
                return true;
            }
        }
        return false;
    }
    
{'fraction_non_alphanumeric': 0.09182487407981403, 'fraction_numerical': 0.0, 'mean_word_length': 3.4904347826086957, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4435396', 'n_tokens_mistral': 766, 'n_tokens_neox': 733, 'n_words': 228}