Przeglądaj źródła

Disables the local client result cache by default (Issue #2461)

Ask Solem 9 lat temu
rodzic
commit
151696c516
2 zmienionych plików z 7 dodań i 3 usunięć
  1. 1 1
      celery/app/defaults.py
  2. 6 2
      docs/configuration.rst

+ 1 - 1
celery/app/defaults.py

@@ -173,7 +173,7 @@ NAMESPACES = Namespace(
 
         backend=Option(type='string'),
         cache_max=Option(
-            100,
+            -1,
             type='int', old={'celery_max_cached_results'},
         ),
         compression=Option(type='str'),

+ 6 - 2
docs/configuration.rst

@@ -594,12 +594,16 @@ Default is to expire after 1 day.
 result_cache_max
 ~~~~~~~~~~~~~~~~
 
-Result backends caches ready results used by the client.
+Enables client caching of results, which can be useful for the old "amqp"
+backend where the result is unavailable as soon as one result instance
+consumes it.
 
 This is the total number of results to cache before older results are evicted.
-The default is 5000.  0 or None means no limit, and a value of :const:`-1`
+A value of 0 or None means no limit, and a value of :const:`-1`
 will disable the cache.
 
+Disabled by default.
+
 .. _conf-database-result-backend:
 
 Database backend settings