rediscache 1.1.2__tar.gz → 1.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: rediscache
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: Redis caching of functions evolving over time
5
5
  License: MIT
6
+ License-File: LICENSE
6
7
  Keywords: redis,performance,cache
7
8
  Author: Pierre Cart-Grandjean
8
9
  Author-email: pcart-grandjean@amadeus.com
@@ -18,6 +19,7 @@ Classifier: Programming Language :: Python :: 3
18
19
  Classifier: Programming Language :: Python :: 3.11
19
20
  Classifier: Programming Language :: Python :: 3.12
20
21
  Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
21
23
  Classifier: Programming Language :: Python :: 3.10
22
24
  Classifier: Programming Language :: Python :: 3.9
23
25
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
@@ -224,9 +226,9 @@ poetry run webapp
224
226
 
225
227
  Entry points:
226
228
 
227
- - Call to long function with parameter value `20` and using the cache but waiting for a result: [link](http://localhost:9090/cached/20)
228
- - Call to long function with parameter value `20` without using the cache: [link](http://localhost:9090/direct/20)
229
- - Get the stats stored in Redis database: [link](http://localhost:9090/stats)
229
+ - Call to long function with parameter value `20` and using the cache but waiting for a result: [cached 20](http://localhost:9090/cached/20)
230
+ - Call to long function with parameter value `20` without using the cache: [direct 20](http://localhost:9090/direct/20)
231
+ - Get the stats stored in Redis database: [stats](http://localhost:9090/stats)
230
232
 
231
233
  There is also a `Nginx` configuration file to further test if with a load balancing of workers. It is useful to demonstrate that many workers can share efficiently the same instance of `Redis`.
232
234
 
@@ -196,9 +196,9 @@ poetry run webapp
196
196
 
197
197
  Entry points:
198
198
 
199
- - Call to long function with parameter value `20` and using the cache but waiting for a result: [link](http://localhost:9090/cached/20)
200
- - Call to long function with parameter value `20` without using the cache: [link](http://localhost:9090/direct/20)
201
- - Get the stats stored in Redis database: [link](http://localhost:9090/stats)
199
+ - Call to long function with parameter value `20` and using the cache but waiting for a result: [cached 20](http://localhost:9090/cached/20)
200
+ - Call to long function with parameter value `20` without using the cache: [direct 20](http://localhost:9090/direct/20)
201
+ - Get the stats stored in Redis database: [stats](http://localhost:9090/stats)
202
202
 
203
203
  There is also a `Nginx` configuration file to further test if with a load balancing of workers. It is useful to demonstrate that many workers can share efficiently the same instance of `Redis`.
204
204
 
@@ -1,7 +1,7 @@
1
1
  # For more details on this file see: https://python-poetry.org/docs/pyproject/
2
2
  [tool.poetry]
3
3
  name = "rediscache"
4
- version = "1.1.2"
4
+ version = "1.1.4"
5
5
  description = "Redis caching of functions evolving over time"
6
6
  authors = ["Pierre Cart-Grandjean <pcart-grandjean@amadeus.com>"]
7
7
  license = "MIT"
@@ -32,11 +32,11 @@ executiontime = "0.4.4"
32
32
  [tool.poetry.group.dev.dependencies]
33
33
  pylint = "^3.3.5"
34
34
  pytest = "^8.3.5"
35
- pdbpp = "^0.10.3"
35
+ pdbpp = "^0.11.6"
36
36
  mypy = "^1.15.0"
37
37
  black = "^25.1.0"
38
38
  pytest-cov = "^6.0.0"
39
- tornado = "^6.4.2"
39
+ tornado = "^6.5.1"
40
40
  pip-audit = "^2.8.0"
41
41
 
42
42
  [build-system]
@@ -106,7 +106,17 @@ class RedisCache:
106
106
  use_kwargs: Optional[List[str]] = None,
107
107
  ) -> str:
108
108
  """
109
- Create a key from the function's name and its parameters values
109
+ Create a key from the function's name and its parameters values.
110
+
111
+ Args:
112
+ name: The name of the function.
113
+ args: The list of positional parameters passed to the function.
114
+ use_args: If not all, the indexes of the positional parameters to be used.
115
+ kwargs: The dictionary of named parameters passed to the function.
116
+ use_kwargs: If not all, the names of the parameters to be used.
117
+
118
+ Returns:
119
+ str: The key to be used in the Redis database.
110
120
  """
111
121
  values = []
112
122
  if args:
File without changes