Преглед на файлове

delay for load spreading implemented

master
Dirk Alders преди 3 месеца
родител
ревизия
08822e9bed
променени са 5 файла, в които са добавени 58 реда и са изтрити 48 реда
  1. 7
    3
      __init__.py
  2. Двоични данни
      _docs_/_downloads/f5f51665bfc67c10ccc039770b738067/unittest.pdf
  3. 0
    1
      _docs_/_sources/index.rst.txt
  4. 50
    43
      _docs_/index.html
  5. 1
    1
      _docs_/searchindex.js

+ 7
- 3
__init__.py Целия файл

@@ -122,14 +122,17 @@ class property_cache_pickle(object):
122 122
         else:
123 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 127
         With the execution of this method, the complete source data which needs to be cached, will be read from the source instance
128 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 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 136
         self._save_cache()
134 137
 
135 138
     def get(self, key, default=None):
@@ -223,7 +226,7 @@ class property_cache_pickle(object):
223 226
     def _key_filter(self, key):
224 227
         return key
225 228
 
226
-    def _load_source(self):
229
+    def _load_source(self, sleep_between_keys=0):
227 230
         if self._cached_props is None:
228 231
             self._init_cache()
229 232
         logger.debug('Loading all data from source - %s', repr(self.keys()))
@@ -231,6 +234,7 @@ class property_cache_pickle(object):
231 234
             if key not in self._source_get_keys:
232 235
                 self._cached_props[self.DATA_TAG][self._key_filter(key)] = self._source_instance.get(key)
233 236
                 self._cached_props[self.AGE_TAG][self._key_filter(key)] = int(time.time())
237
+                time.sleep(sleep_between_keys)
234 238
 
235 239
     def _save_cache(self):
236 240
         with open(self._cache_filename, 'wb') as fh:

Двоични данни
_docs_/_downloads/f5f51665bfc67c10ccc039770b738067/unittest.pdf Целия файл


+ 0
- 1
_docs_/_sources/index.rst.txt Целия файл

@@ -10,7 +10,6 @@ Welcome to cachings's documentation!
10 10
    :members:
11 11
 
12 12
 .. toctree::
13
-   :orphan: LICENSE.rst
14 13
    :maxdepth: 2
15 14
    :caption: Contents:
16 15
 

+ 50
- 43
_docs_/index.html Целия файл

@@ -260,30 +260,30 @@
260 260
 <p>Will result on the first execution to the following output (with a long execution time):</p>
261 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 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 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 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 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 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 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 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 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 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 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 287
 <span class="n">five</span>
288 288
 <span class="o">--------------------------------</span>
289 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,17 +292,17 @@
292 292
 <p>With every following execution the time cosumption my by much smaller:</p>
293 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 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 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 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 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 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 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 306
 <span class="n">five</span>
307 307
 <span class="o">--------------------------------</span>
308 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,30 +430,30 @@ if the conditions for the cache usage are given.</p>
430 430
 <p>Will result on the first execution to the following output (with a long execution time):</p>
431 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 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 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 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 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 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 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 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 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 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 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 457
 <span class="n">five</span>
458 458
 <span class="o">--------------------------------</span>
459 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,17 +462,17 @@ if the conditions for the cache usage are given.</p>
462 462
 <p>With every following execution the time cosumption my by much smaller:</p>
463 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 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 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 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 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 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 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 476
 <span class="n">five</span>
477 477
 <span class="o">--------------------------------</span>
478 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,9 +491,14 @@ if the conditions for the cache usage are given.</p>
491 491
 
492 492
 <dl class="py method">
493 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 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 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 502
 <div class="admonition hint">
498 503
 <p class="admonition-title">Hint</p>
499 504
 <p>Use this method, if you initiallised the class with <cite>store_on_get=False</cite></p>
@@ -519,6 +524,8 @@ and the resulting cache will be stored to the given file.</p>
519 524
 
520 525
 </dd></dl>
521 526
 
527
+<div class="toctree-wrapper compound">
528
+</div>
522 529
 </section>
523 530
 <section id="indices-and-tables">
524 531
 <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Link to this heading">¶</a></h1>

+ 1
- 1
_docs_/searchindex.js
Файловите разлики са ограничени, защото са твърде много
Целия файл


Loading…
Отказ
Запис