code: def test_query_cached(self):
      cache = lore.stores.query_cache
      length = len(cache)
      now = datetime.datetime.now()
  
      # first copy is stored in the cache
      calls = self.one_shot_function(
          when=now, int=length, str="hi", cache=True
      )
      self.assertEqual(length + 1, len(cache))
      self.assertEqual(1, calls)
  
      # second is retrieved
      calls = self.one_shot_function(
          when=now, int=length, str="hi", cache=True
      )
      self.assertEqual(length + 1, len(cache))
      self.assertEqual(1, calls)
      self.assertEqual(1, self.one_shot_calls)
  
file_path: lore/tests/unit/test_stores.py
imports: import datetime
  import unittest
  import os
  import time
  import lore
  from lore.stores import query_cached
  from lore.stores.disk import Disk
label_desc: Use image node_id 4 for calling the TestDisk obj's underlying member method code with example usage: obj.test_query_cached() without return types