ソースを参照

delay for load spreading implemented

master
Dirk Alders 3ヶ月前
コミット
08822e9bed

+ 7
- 3
__init__.py ファイルの表示

122
         else:
122
         else:
123
             self._source_get_keys.append(keys)
123
             self._source_get_keys.append(keys)
124
 
124
 
125
-    def full_update(self):
125
+    def full_update(self, sleep_between_keys=0):
126
         """
126
         """
127
         With the execution of this method, the complete source data which needs to be cached, will be read from the source instance
127
         With the execution of this method, the complete source data which needs to be cached, will be read from the source instance
128
         and the resulting cache will be stored to the given file.
128
         and the resulting cache will be stored to the given file.
129
 
129
 
130
+        :param sleep_between_keys: Time to sleep between each source data generation
131
+        :type sleep_between_keys: float, int
132
+
130
         .. hint:: Use this method, if you initiallised the class with `store_on_get=False`
133
         .. hint:: Use this method, if you initiallised the class with `store_on_get=False`
131
         """
134
         """
132
-        self._load_source()
135
+        self._load_source(sleep_between_keys=sleep_between_keys)
133
         self._save_cache()
136
         self._save_cache()
134
 
137
 
135
     def get(self, key, default=None):
138
     def get(self, key, default=None):
223
     def _key_filter(self, key):
226
     def _key_filter(self, key):
224
         return key
227
         return key
225
 
228
 
226
-    def _load_source(self):
229
+    def _load_source(self, sleep_between_keys=0):
227
         if self._cached_props is None:
230
         if self._cached_props is None:
228
             self._init_cache()
231
             self._init_cache()
229
         logger.debug('Loading all data from source - %s', repr(self.keys()))
232
         logger.debug('Loading all data from source - %s', repr(self.keys()))
231
             if key not in self._source_get_keys:
234
             if key not in self._source_get_keys:
232
                 self._cached_props[self.DATA_TAG][self._key_filter(key)] = self._source_instance.get(key)
235
                 self._cached_props[self.DATA_TAG][self._key_filter(key)] = self._source_instance.get(key)
233
                 self._cached_props[self.AGE_TAG][self._key_filter(key)] = int(time.time())
236
                 self._cached_props[self.AGE_TAG][self._key_filter(key)] = int(time.time())
237
+                time.sleep(sleep_between_keys)
234
 
238
 
235
     def _save_cache(self):
239
     def _save_cache(self):
236
         with open(self._cache_filename, 'wb') as fh:
240
         with open(self._cache_filename, 'wb') as fh:

バイナリ
_docs_/_downloads/f5f51665bfc67c10ccc039770b738067/unittest.pdf ファイルの表示


+ 0
- 1
_docs_/_sources/index.rst.txt ファイルの表示

10
    :members:
10
    :members:
11
 
11
 
12
 .. toctree::
12
 .. toctree::
13
-   :orphan: LICENSE.rst
14
    :maxdepth: 2
13
    :maxdepth: 2
15
    :caption: Contents:
14
    :caption: Contents:
16
 
15
 

+ 50
- 43
_docs_/index.html ファイルの表示

260
 <p>Will result on the first execution to the following output (with a long execution time):</p>
260
 <p>Will result on the first execution to the following output (with a long execution time):</p>
261
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Testing</span> <span class="n">property_cache</span> <span class="p">(</span><span class="n">json</span><span class="p">):</span>
261
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Testing</span> <span class="n">property_cache</span> <span class="p">(</span><span class="n">json</span><span class="p">):</span>
262
 <span class="o">--------------------------------</span>
262
 <span class="o">--------------------------------</span>
263
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">19</span><span class="p">,</span><span class="mi">816</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Cache</span> <span class="n">file</span> <span class="n">does</span> <span class="ow">not</span> <span class="n">exists</span> <span class="p">(</span><span class="n">yet</span><span class="p">)</span><span class="o">.</span>
264
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">19</span><span class="p">,</span><span class="mi">817</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
265
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">19</span><span class="p">,</span><span class="mi">817</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;1&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
263
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">43</span><span class="p">,</span><span class="mi">744</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Cache</span> <span class="n">file</span> <span class="n">does</span> <span class="ow">not</span> <span class="n">exists</span> <span class="p">(</span><span class="n">yet</span><span class="p">)</span><span class="o">.</span>
264
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">43</span><span class="p">,</span><span class="mi">745</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
265
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">43</span><span class="p">,</span><span class="mi">745</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;1&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
266
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__1__</span>
266
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__1__</span>
267
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">22</span><span class="p">,</span><span class="mi">817</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">one</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726928902</span> <span class="n">to</span> <span class="n">chache</span>
268
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">22</span><span class="p">,</span><span class="mi">818</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
267
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">46</span><span class="p">,</span><span class="mi">746</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">one</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726956166</span> <span class="n">to</span> <span class="n">chache</span>
268
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">46</span><span class="p">,</span><span class="mi">747</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
269
 <span class="n">one</span>
269
 <span class="n">one</span>
270
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">22</span><span class="p">,</span><span class="mi">819</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;2&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
270
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">46</span><span class="p">,</span><span class="mi">748</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;2&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
271
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__2__</span>
271
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__2__</span>
272
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">25</span><span class="p">,</span><span class="mi">819</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">two</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726928905</span> <span class="n">to</span> <span class="n">chache</span>
273
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">25</span><span class="p">,</span><span class="mi">820</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
272
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">49</span><span class="p">,</span><span class="mi">749</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">two</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726956169</span> <span class="n">to</span> <span class="n">chache</span>
273
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">49</span><span class="p">,</span><span class="mi">750</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
274
 <span class="n">two</span>
274
 <span class="n">two</span>
275
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">25</span><span class="p">,</span><span class="mi">821</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Key</span> <span class="s1">&#39;three&#39;</span> <span class="ow">is</span> <span class="n">excluded</span> <span class="n">by</span> <span class="o">.</span><span class="n">add_source_get_keys</span><span class="p">()</span><span class="o">.</span> <span class="n">Uncached</span> <span class="n">data</span> <span class="n">will</span> <span class="n">be</span> <span class="n">returned</span><span class="o">.</span>
275
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">49</span><span class="p">,</span><span class="mi">751</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Key</span> <span class="s1">&#39;three&#39;</span> <span class="ow">is</span> <span class="n">excluded</span> <span class="n">by</span> <span class="o">.</span><span class="n">add_source_get_keys</span><span class="p">()</span><span class="o">.</span> <span class="n">Uncached</span> <span class="n">data</span> <span class="n">will</span> <span class="n">be</span> <span class="n">returned</span><span class="o">.</span>
276
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__three__</span>
276
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__three__</span>
277
 <span class="n">three</span>
277
 <span class="n">three</span>
278
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">28</span><span class="p">,</span><span class="mi">821</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;four&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
278
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">52</span><span class="p">,</span><span class="mi">752</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;four&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
279
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__four__</span>
279
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__four__</span>
280
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">31</span><span class="p">,</span><span class="mi">822</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="n">four</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">four</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726928911</span> <span class="n">to</span> <span class="n">chache</span>
281
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">31</span><span class="p">,</span><span class="mi">822</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
280
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">55</span><span class="p">,</span><span class="mi">754</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="n">four</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">four</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726956175</span> <span class="n">to</span> <span class="n">chache</span>
281
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">55</span><span class="p">,</span><span class="mi">755</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
282
 <span class="n">four</span>
282
 <span class="n">four</span>
283
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">31</span><span class="p">,</span><span class="mi">823</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;five&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
283
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">55</span><span class="p">,</span><span class="mi">755</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;five&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
284
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__five__</span>
284
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__five__</span>
285
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">34</span><span class="p">,</span><span class="mi">824</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="n">five</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">five</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726928914</span> <span class="n">to</span> <span class="n">chache</span>
286
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">34</span><span class="p">,</span><span class="mi">824</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
285
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">58</span><span class="p">,</span><span class="mi">757</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="n">five</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">five</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726956178</span> <span class="n">to</span> <span class="n">chache</span>
286
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">58</span><span class="p">,</span><span class="mi">758</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
287
 <span class="n">five</span>
287
 <span class="n">five</span>
288
 <span class="o">--------------------------------</span>
288
 <span class="o">--------------------------------</span>
289
 <span class="n">The</span> <span class="n">execution</span> <span class="n">time</span> <span class="n">was</span> <span class="mf">15.0</span><span class="n">s</span>
289
 <span class="n">The</span> <span class="n">execution</span> <span class="n">time</span> <span class="n">was</span> <span class="mf">15.0</span><span class="n">s</span>
292
 <p>With every following execution the time cosumption my by much smaller:</p>
292
 <p>With every following execution the time cosumption my by much smaller:</p>
293
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Testing</span> <span class="n">property_cache</span> <span class="p">(</span><span class="n">json</span><span class="p">):</span>
293
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Testing</span> <span class="n">property_cache</span> <span class="p">(</span><span class="n">json</span><span class="p">):</span>
294
 <span class="o">--------------------------------</span>
294
 <span class="o">--------------------------------</span>
295
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">34</span><span class="p">,</span><span class="mi">865</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="n">properties</span> <span class="kn">from</span> <span class="nn">cache</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
296
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">34</span><span class="p">,</span><span class="mi">865</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;1&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
295
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">58</span><span class="p">,</span><span class="mi">825</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="n">properties</span> <span class="kn">from</span> <span class="nn">cache</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
296
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">58</span><span class="p">,</span><span class="mi">825</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;1&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
297
 <span class="n">one</span>
297
 <span class="n">one</span>
298
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">34</span><span class="p">,</span><span class="mi">865</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;2&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
298
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">58</span><span class="p">,</span><span class="mi">825</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;2&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
299
 <span class="n">two</span>
299
 <span class="n">two</span>
300
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">34</span><span class="p">,</span><span class="mi">865</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Key</span> <span class="s1">&#39;three&#39;</span> <span class="ow">is</span> <span class="n">excluded</span> <span class="n">by</span> <span class="o">.</span><span class="n">add_source_get_keys</span><span class="p">()</span><span class="o">.</span> <span class="n">Uncached</span> <span class="n">data</span> <span class="n">will</span> <span class="n">be</span> <span class="n">returned</span><span class="o">.</span>
300
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="mi">58</span><span class="p">,</span><span class="mi">825</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Key</span> <span class="s1">&#39;three&#39;</span> <span class="ow">is</span> <span class="n">excluded</span> <span class="n">by</span> <span class="o">.</span><span class="n">add_source_get_keys</span><span class="p">()</span><span class="o">.</span> <span class="n">Uncached</span> <span class="n">data</span> <span class="n">will</span> <span class="n">be</span> <span class="n">returned</span><span class="o">.</span>
301
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__three__</span>
301
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__three__</span>
302
 <span class="n">three</span>
302
 <span class="n">three</span>
303
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">37</span><span class="p">,</span><span class="mi">865</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;four&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
303
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">01</span><span class="p">,</span><span class="mi">827</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;four&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
304
 <span class="n">four</span>
304
 <span class="n">four</span>
305
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">37</span><span class="p">,</span><span class="mi">866</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;five&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
305
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">01</span><span class="p">,</span><span class="mi">827</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;five&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
306
 <span class="n">five</span>
306
 <span class="n">five</span>
307
 <span class="o">--------------------------------</span>
307
 <span class="o">--------------------------------</span>
308
 <span class="n">The</span> <span class="n">execution</span> <span class="n">time</span> <span class="n">was</span> <span class="mf">3.0</span><span class="n">s</span>
308
 <span class="n">The</span> <span class="n">execution</span> <span class="n">time</span> <span class="n">was</span> <span class="mf">3.0</span><span class="n">s</span>
430
 <p>Will result on the first execution to the following output (with a long execution time):</p>
430
 <p>Will result on the first execution to the following output (with a long execution time):</p>
431
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Testing</span> <span class="n">property_cache</span> <span class="p">(</span><span class="n">pickle</span><span class="p">):</span>
431
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Testing</span> <span class="n">property_cache</span> <span class="p">(</span><span class="n">pickle</span><span class="p">):</span>
432
 <span class="o">--------------------------------</span>
432
 <span class="o">--------------------------------</span>
433
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">37</span><span class="p">,</span><span class="mi">924</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Cache</span> <span class="n">file</span> <span class="n">does</span> <span class="ow">not</span> <span class="n">exists</span> <span class="p">(</span><span class="n">yet</span><span class="p">)</span><span class="o">.</span>
434
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">37</span><span class="p">,</span><span class="mi">924</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
435
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">37</span><span class="p">,</span><span class="mi">924</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;1&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
433
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">01</span><span class="p">,</span><span class="mi">889</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Cache</span> <span class="n">file</span> <span class="n">does</span> <span class="ow">not</span> <span class="n">exists</span> <span class="p">(</span><span class="n">yet</span><span class="p">)</span><span class="o">.</span>
434
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">01</span><span class="p">,</span><span class="mi">890</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
435
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">01</span><span class="p">,</span><span class="mi">890</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;1&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
436
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__1__</span>
436
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__1__</span>
437
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">40</span><span class="p">,</span><span class="mi">925</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">one</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726928920</span> <span class="n">to</span> <span class="n">chache</span>
438
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">40</span><span class="p">,</span><span class="mi">926</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
437
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">04</span><span class="p">,</span><span class="mi">891</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">one</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726956184</span> <span class="n">to</span> <span class="n">chache</span>
438
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">04</span><span class="p">,</span><span class="mi">891</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
439
 <span class="n">one</span>
439
 <span class="n">one</span>
440
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">40</span><span class="p">,</span><span class="mi">926</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;2&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
440
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">04</span><span class="p">,</span><span class="mi">892</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;2&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
441
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__2__</span>
441
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__2__</span>
442
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">43</span><span class="p">,</span><span class="mi">927</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">two</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726928923</span> <span class="n">to</span> <span class="n">chache</span>
443
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">43</span><span class="p">,</span><span class="mi">928</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
442
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">07</span><span class="p">,</span><span class="mi">892</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">two</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726956187</span> <span class="n">to</span> <span class="n">chache</span>
443
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">07</span><span class="p">,</span><span class="mi">893</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
444
 <span class="n">two</span>
444
 <span class="n">two</span>
445
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">43</span><span class="p">,</span><span class="mi">928</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Key</span> <span class="s1">&#39;three&#39;</span> <span class="ow">is</span> <span class="n">excluded</span> <span class="n">by</span> <span class="o">.</span><span class="n">add_source_get_keys</span><span class="p">()</span><span class="o">.</span> <span class="n">Uncached</span> <span class="n">data</span> <span class="n">will</span> <span class="n">be</span> <span class="n">returned</span><span class="o">.</span>
445
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">07</span><span class="p">,</span><span class="mi">894</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Key</span> <span class="s1">&#39;three&#39;</span> <span class="ow">is</span> <span class="n">excluded</span> <span class="n">by</span> <span class="o">.</span><span class="n">add_source_get_keys</span><span class="p">()</span><span class="o">.</span> <span class="n">Uncached</span> <span class="n">data</span> <span class="n">will</span> <span class="n">be</span> <span class="n">returned</span><span class="o">.</span>
446
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__three__</span>
446
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__three__</span>
447
 <span class="n">three</span>
447
 <span class="n">three</span>
448
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">46</span><span class="p">,</span><span class="mi">929</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;four&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
448
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">10</span><span class="p">,</span><span class="mi">894</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;four&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
449
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__four__</span>
449
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__four__</span>
450
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">49</span><span class="p">,</span><span class="mi">930</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="n">four</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">four</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726928929</span> <span class="n">to</span> <span class="n">chache</span>
451
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">49</span><span class="p">,</span><span class="mi">930</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
450
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">13</span><span class="p">,</span><span class="mi">895</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="n">four</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">four</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726956193</span> <span class="n">to</span> <span class="n">chache</span>
451
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">13</span><span class="p">,</span><span class="mi">896</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
452
 <span class="n">four</span>
452
 <span class="n">four</span>
453
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">49</span><span class="p">,</span><span class="mi">931</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;five&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
453
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">13</span><span class="p">,</span><span class="mi">897</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="nb">property</span> <span class="k">for</span> <span class="n">key</span><span class="o">=</span><span class="s1">&#39;five&#39;</span> <span class="kn">from</span> <span class="nn">source</span> <span class="n">instance</span>
454
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__five__</span>
454
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__five__</span>
455
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">52</span><span class="p">,</span><span class="mi">931</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="n">five</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">five</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726928932</span> <span class="n">to</span> <span class="n">chache</span>
456
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">52</span><span class="p">,</span><span class="mi">932</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
455
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">16</span><span class="p">,</span><span class="mi">898</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Adding</span> <span class="n">key</span><span class="o">=</span><span class="n">five</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">five</span> <span class="k">with</span> <span class="n">timestamp</span><span class="o">=</span><span class="mi">1726956196</span> <span class="n">to</span> <span class="n">chache</span>
456
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">16</span><span class="p">,</span><span class="mi">899</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">cache</span><span class="o">-</span><span class="n">file</span> <span class="n">stored</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
457
 <span class="n">five</span>
457
 <span class="n">five</span>
458
 <span class="o">--------------------------------</span>
458
 <span class="o">--------------------------------</span>
459
 <span class="n">The</span> <span class="n">execution</span> <span class="n">time</span> <span class="n">was</span> <span class="mf">15.0</span><span class="n">s</span>
459
 <span class="n">The</span> <span class="n">execution</span> <span class="n">time</span> <span class="n">was</span> <span class="mf">15.0</span><span class="n">s</span>
462
 <p>With every following execution the time cosumption my by much smaller:</p>
462
 <p>With every following execution the time cosumption my by much smaller:</p>
463
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Testing</span> <span class="n">property_cache</span> <span class="p">(</span><span class="n">pickle</span><span class="p">):</span>
463
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Testing</span> <span class="n">property_cache</span> <span class="p">(</span><span class="n">pickle</span><span class="p">):</span>
464
 <span class="o">--------------------------------</span>
464
 <span class="o">--------------------------------</span>
465
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">52</span><span class="p">,</span><span class="mi">973</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="n">properties</span> <span class="kn">from</span> <span class="nn">cache</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
466
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">52</span><span class="p">,</span><span class="mi">973</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;1&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
465
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">16</span><span class="p">,</span><span class="mi">978</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Loading</span> <span class="n">properties</span> <span class="kn">from</span> <span class="nn">cache</span> <span class="p">(</span><span class="n">cache</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
466
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">16</span><span class="p">,</span><span class="mi">978</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;1&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
467
 <span class="n">one</span>
467
 <span class="n">one</span>
468
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">52</span><span class="p">,</span><span class="mi">973</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;2&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
468
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">16</span><span class="p">,</span><span class="mi">978</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;2&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
469
 <span class="n">two</span>
469
 <span class="n">two</span>
470
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">52</span><span class="p">,</span><span class="mi">973</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Key</span> <span class="s1">&#39;three&#39;</span> <span class="ow">is</span> <span class="n">excluded</span> <span class="n">by</span> <span class="o">.</span><span class="n">add_source_get_keys</span><span class="p">()</span><span class="o">.</span> <span class="n">Uncached</span> <span class="n">data</span> <span class="n">will</span> <span class="n">be</span> <span class="n">returned</span><span class="o">.</span>
470
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">16</span><span class="p">,</span><span class="mi">979</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Key</span> <span class="s1">&#39;three&#39;</span> <span class="ow">is</span> <span class="n">excluded</span> <span class="n">by</span> <span class="o">.</span><span class="n">add_source_get_keys</span><span class="p">()</span><span class="o">.</span> <span class="n">Uncached</span> <span class="n">data</span> <span class="n">will</span> <span class="n">be</span> <span class="n">returned</span><span class="o">.</span>
471
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__three__</span>
471
 <span class="n">slow</span> <span class="n">get</span> <span class="n">executed</span> <span class="k">for</span> <span class="n">__three__</span>
472
 <span class="n">three</span>
472
 <span class="n">three</span>
473
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">55</span><span class="p">,</span><span class="mi">974</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;four&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
473
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">19</span><span class="p">,</span><span class="mi">980</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;four&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
474
 <span class="n">four</span>
474
 <span class="n">four</span>
475
-<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">21</span> <span class="mi">16</span><span class="p">:</span><span class="mi">28</span><span class="p">:</span><span class="mi">55</span><span class="p">,</span><span class="mi">974</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;five&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
475
+<span class="mi">2024</span><span class="o">-</span><span class="mi">09</span><span class="o">-</span><span class="mi">22</span> <span class="mi">00</span><span class="p">:</span><span class="mi">03</span><span class="p">:</span><span class="mi">19</span><span class="p">,</span><span class="mi">981</span><span class="p">:</span>    <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">caching</span> <span class="o">-</span> <span class="n">Providing</span> <span class="nb">property</span> <span class="k">for</span> <span class="s1">&#39;five&#39;</span> <span class="kn">from</span> <span class="nn">cache</span>
476
 <span class="n">five</span>
476
 <span class="n">five</span>
477
 <span class="o">--------------------------------</span>
477
 <span class="o">--------------------------------</span>
478
 <span class="n">The</span> <span class="n">execution</span> <span class="n">time</span> <span class="n">was</span> <span class="mf">3.0</span><span class="n">s</span>
478
 <span class="n">The</span> <span class="n">execution</span> <span class="n">time</span> <span class="n">was</span> <span class="mf">3.0</span><span class="n">s</span>
491
 
491
 
492
 <dl class="py method">
492
 <dl class="py method">
493
 <dt class="sig sig-object py" id="caching.property_cache_pickle.full_update">
493
 <dt class="sig sig-object py" id="caching.property_cache_pickle.full_update">
494
-<span class="sig-name descname"><span class="pre">full_update</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#caching.property_cache_pickle.full_update" title="Link to this definition">¶</a></dt>
494
+<span class="sig-name descname"><span class="pre">full_update</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sleep_between_keys</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#caching.property_cache_pickle.full_update" title="Link to this definition">¶</a></dt>
495
 <dd><p>With the execution of this method, the complete source data which needs to be cached, will be read from the source instance
495
 <dd><p>With the execution of this method, the complete source data which needs to be cached, will be read from the source instance
496
 and the resulting cache will be stored to the given file.</p>
496
 and the resulting cache will be stored to the given file.</p>
497
+<dl class="field-list simple">
498
+<dt class="field-odd">Parameters<span class="colon">:</span></dt>
499
+<dd class="field-odd"><p><strong>sleep_between_keys</strong> (<em>float</em><em>, </em><em>int</em>) – Time to sleep between each source data generation</p>
500
+</dd>
501
+</dl>
497
 <div class="admonition hint">
502
 <div class="admonition hint">
498
 <p class="admonition-title">Hint</p>
503
 <p class="admonition-title">Hint</p>
499
 <p>Use this method, if you initiallised the class with <cite>store_on_get=False</cite></p>
504
 <p>Use this method, if you initiallised the class with <cite>store_on_get=False</cite></p>
519
 
524
 
520
 </dd></dl>
525
 </dd></dl>
521
 
526
 
527
+<div class="toctree-wrapper compound">
528
+</div>
522
 </section>
529
 </section>
523
 <section id="indices-and-tables">
530
 <section id="indices-and-tables">
524
 <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Link to this heading">¶</a></h1>
531
 <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Link to this heading">¶</a></h1>

+ 1
- 1
_docs_/searchindex.js
ファイル差分が大きすぎるため省略します
ファイルの表示


読み込み中…
キャンセル
保存