vikramvasudevan commited on
Commit
6258e94
·
verified ·
1 Parent(s): 4f9f712

Update db.py

Browse files

Fix for bhagavat gita count

Files changed (1) hide show
  1. db.py +1 -1
db.py CHANGED
@@ -630,7 +630,7 @@ class SanatanDatabase:
630
  cached_entry = self._count_cache.get(collection_name)
631
  if cached_entry:
632
  ts, cached_count = cached_entry
633
- if now - ts < self._cache_ttl:
634
  logger.debug("Cache hit for collection [%s]: %d", collection_name, cached_count)
635
  return cached_count
636
  else:
 
630
  cached_entry = self._count_cache.get(collection_name)
631
  if cached_entry:
632
  ts, cached_count = cached_entry
633
+ if now - ts < self._cache_ttl and cached_count > 0:
634
  logger.debug("Cache hit for collection [%s]: %d", collection_name, cached_count)
635
  return cached_count
636
  else: