private static void ProcessTransaction(CacheInvalidationRowGlobal row, bool debugging = false) { if (debugging) { Debug($"row.TransactionType.ToLowerInvariant() = {row.TransactionType.ToLowerInvariant()}"); } switch (row.TransactionType.ToLowerInvariant()) { case "all": VotePage.LogInfo("LocalCacheInvalidation", "Begin InvalidateAll"); InvalidateAll(); break; case "nagsall": InvalidateNagsAll(debugging); break; case "politicianimage": InvalidatePoliticianImage(row.CacheKey); break; default: throw new VoteException( "Unidentified invalidation transaction type" + row.TransactionType); } }
private static void ProcessTransaction(CacheInvalidationRow row) { switch (row.TransactionType.ToLowerInvariant()) { case "all": VotePage.LogInfo("LocalCacheInvalidation", "Begin InvalidateAll"); InvalidateAll(); break; //case "ballotall": // InvalidateBallotAll(); // break; //case "ballotbydomaindesigncodeelectionkey": // { // var keys = row.CacheKey.Split('|'); // if (keys.Length == 2) // InvalidateBallotByDomainDesignCodeElectionKey(keys[0], keys[1]); // } // break; //case "ballotbyelectionkey": // InvalidateBallotByElectionKey(row.CacheKey); // break; //case "electedall": // InvalidateElectedAll(); // break; //case "electedbystatecode": // InvalidateElectedByStateCode(row.CacheKey); // break; //case "electionall": // InvalidateElectionAll(); // break; //case "electionbyelectionkey": // InvalidateElectionByElectionKey(row.CacheKey); // break; //case "introall": // InvalidateIntroAll(); // break; //case "introbypoliticiankey": // InvalidateIntroByPoliticianKey(row.CacheKey); // break; //case "issueall": // InvalidateIssueAll(); // break; //case "issuebyissuekey": // InvalidateIssueByIssueKey(row.CacheKey); // break; //case "issuebyofficekey": // InvalidateIssueByOfficeKey(row.CacheKey); // break; //case "issuebyelectionkeyofficekey": // { // var keys = row.CacheKey.Split('|'); // if (keys.Length == 2) // InvalidateIssueByElectionKeyOfficeKey(keys[0], keys[1]); // } // break; //case "issuebyofficekeyissuekey": // { // var keys = row.CacheKey.Split('|'); // if (keys.Length == 2) // InvalidateIssueByOfficeKeyIssueKey(keys[0], keys[1]); // } // break; //case "issuebyelectionkeyofficekeyissuekey": // { // var keys = row.CacheKey.Split('|'); // if (keys.Length == 3) // InvalidateIssueByElectionKeyOfficeKeyIssueKey( // keys[0], keys[1], keys[2]); // } // break; case "nagsall": InvalidateNagsAll(); break; //case "officialsall": // InvalidateOfficialsAll(); // break; //case "officialsbystatecode": // InvalidateOfficialsByStateCode(row.CacheKey); // break; //case "officialsbystatecodecountycode": // { // var keys = row.CacheKey.Split('|'); // if (keys.Length == 2) // InvalidateOfficialsByStateCodeCountyCode(keys[0], keys[1]); // } // break; //case "officialsbystatecodecountycodelocalcode": // { // var keys = row.CacheKey.Split('|'); // if (keys.Length == 3) // InvalidateOfficialsByStateCodeCountyCodeLocalCode( // keys[0], keys[1], keys[2]); // } // break; case "politicianimage": InvalidatePoliticianImage(row.CacheKey); break; //case "politicianissueall": // InvalidatePoliticianIssueAll(); // break; //case "politicianissuebyissuekey": // InvalidatePoliticianIssueByIssuekey(row.CacheKey); // break; //case "politicianissuebypoliticiankey": // InvalidatePoliticianIssueByPoliticianKey(row.CacheKey); // break; //case "politicianissuebypoliticiankeyissuekey": // { // var keys = row.CacheKey.Split('|'); // if (keys.Length == 2) // InvalidatePoliticianIssueByPoliticianKeyIssueKey(keys[0], keys[1]); // } // break; //case "referendumall": // InvalidateReferendumAll(); // break; //case "referendumbyelectionkey": // InvalidateReferendumByElectionkey(row.CacheKey); // break; default: throw new VoteException( "Unidentified invalidation transaction type" + row.TransactionType); } }