INNER CODE UNIT · TypeScript

useCache

open-source-labs/obsidian · src/Obsidian.ts:65

  useCache = true, // default to true
  redisPort = 6379,
  policy = 'allkeys-lru',
  maxmemory = '2000mb',
  searchTerms = [], // Developer can pass in array of search categories
  persistQueries = false, // default to false
  hashTableSize = 16, // default to 16
  maxQueryDepth = 0,
  customIdentifier = ['__typename', '_id'],
  mutationTableMap = {}, // Developer passes in object where keys are add mutations and values are arrays of affected tables
}: ObsidianRouterOptions<T>): Promise<T> {
  const router = new Router();
  const schema = makeExecutableSchema({ typeDefs, resolvers });

  let cache, hashTable;
  if (useCache) {
    cache = new Cache();
    scope.cache = cache;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…