Mike Bayer avatar Mike Bayer committed 2a27ed0

add a note about get_or_create() expiration_time.

Comments (0)

Files changed (1)


         :param expiration_time: optional expiration time which will overide
          the expiration time already configured on this :class:`.CacheRegion`
          if not None.   To set no expiration, use the value -1.
+         .. note::
+            the expiration_time argument here is **not guaranteed** to be
+            effective if multiple concurrent threads are accessing the same
+            key via :meth:`get_or_create` using different values
+            for ``expiration_time`` - the first thread within a cluster
+            of concurrent usages establishes the expiration time within a
+            :class:`.Dogpile` instance for the duration of those usages.
+            It is advised that all access to a particular key within a particular 
+            :class:`.CacheRegion` use the **same** value for ``expiration_time``.
+            Sticking with the default expiration time configured for 
+            the :class:`.CacheRegion` as a whole is expected to be the
+            usual mode of operation.
         if self.key_mangler:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.