aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.rst
blob: 0c24a03c6564b87adcd30ca13963255be7cba988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
v4.2.4 (2021-09-30)
===================

- Add submodule shims for backward compatibility.


v4.2.3 (2021-09-29)
===================

- Add documentation and tests for using ``TTLCache`` with
  ``datetime``.

- Link to typeshed typing stubs.

- Flatten package file hierarchy.


v4.2.2 (2021-04-27)
===================

- Update build environment.

- Remove Python 2 remnants.

- Format code with Black.


v4.2.1 (2021-01-24)
===================

- Handle ``__missing__()`` not storing cache items.

- Clean up ``__missing__()`` example.


v4.2.0 (2020-12-10)
===================

- Add FIFO cache implementation.

- Add MRU cache implementation.

- Improve behavior of decorators in case of race conditions.

- Improve documentation regarding mutability of caches values and use
  of key functions with decorators.

- Officially support Python 3.9.


v4.1.1 (2020-06-28)
===================

- Improve ``popitem()`` exception context handling.

- Replace ``float('inf')`` with ``math.inf``.

- Improve "envkey" documentation example.


v4.1.0 (2020-04-08)
===================

- Support ``user_function`` with ``cachetools.func`` decorators
  (Python 3.8 compatibility).

- Support ``cache_parameters()`` with ``cachetools.func`` decorators
  (Python 3.9 compatibility).


v4.0.0 (2019-12-15)
===================

- Require Python 3.5 or later.


v3.1.1 (2019-05-23)
===================

- Document how to use shared caches with ``@cachedmethod``.

- Fix pickling/unpickling of cache keys


v3.1.0 (2019-01-29)
===================

- Fix Python 3.8 compatibility issue.

- Use ``time.monotonic`` as default timer if available.

- Improve documentation regarding thread safety.


v3.0.0 (2018-11-04)
===================

- Officially support Python 3.7.

- Drop Python 3.3 support (breaking change).

- Remove ``missing`` cache constructor parameter (breaking change).

- Remove ``self`` from ``@cachedmethod`` key arguments (breaking
  change).

- Add support for ``maxsize=None`` in ``cachetools.func`` decorators.


v2.1.0 (2018-05-12)
===================

- Deprecate ``missing`` cache constructor parameter.

- Handle overridden ``getsizeof()`` method in subclasses.

- Fix Python 2.7 ``RRCache`` pickling issues.

- Various documentation improvements.


v2.0.1 (2017-08-11)
===================

- Officially support Python 3.6.

- Move documentation to RTD.

- Documentation: Update import paths for key functions (courtesy of
  slavkoja).


v2.0.0 (2016-10-03)
===================

- Drop Python 3.2 support (breaking change).

- Drop support for deprecated features (breaking change).

- Move key functions to separate package (breaking change).

- Accept non-integer ``maxsize`` in ``Cache.__repr__()``.


v1.1.6 (2016-04-01)
===================

- Reimplement ``LRUCache`` and ``TTLCache`` using
  ``collections.OrderedDict``.  Note that this will break pickle
  compatibility with previous versions.

- Fix ``TTLCache`` not calling ``__missing__()`` of derived classes.

- Handle ``ValueError`` in ``Cache.__missing__()`` for consistency
  with caching decorators.

- Improve how ``TTLCache`` handles expired items.

- Use ``Counter.most_common()`` for ``LFUCache.popitem()``.


v1.1.5 (2015-10-25)
===================

- Refactor ``Cache`` base class.  Note that this will break pickle
  compatibility with previous versions.

- Clean up ``LRUCache`` and ``TTLCache`` implementations.


v1.1.4 (2015-10-24)
===================

- Refactor ``LRUCache`` and ``TTLCache`` implementations.  Note that
  this will break pickle compatibility with previous versions.

- Document pending removal of deprecated features.

- Minor documentation improvements.


v1.1.3 (2015-09-15)
===================

- Fix pickle tests.


v1.1.2 (2015-09-15)
===================

- Fix pickling of large ``LRUCache`` and ``TTLCache`` instances.


v1.1.1 (2015-09-07)
===================

- Improve key functions.

- Improve documentation.

- Improve unit test coverage.


v1.1.0 (2015-08-28)
===================

- Add ``@cached`` function decorator.

- Add ``hashkey`` and ``typedkey`` fuctions.

- Add `key` and `lock` arguments to ``@cachedmethod``.

- Set ``__wrapped__`` attributes for Python versions < 3.2.

- Move ``functools`` compatible decorators to ``cachetools.func``.

- Deprecate ``@cachedmethod`` `typed` argument.

- Deprecate `cache` attribute for ``@cachedmethod`` wrappers.

- Deprecate `getsizeof` and `lock` arguments for `cachetools.func`
  decorator.


v1.0.3 (2015-06-26)
===================

- Clear cache statistics when calling ``clear_cache()``.


v1.0.2 (2015-06-18)
===================

- Allow simple cache instances to be pickled.

- Refactor ``Cache.getsizeof`` and ``Cache.missing`` default
  implementation.


v1.0.1 (2015-06-06)
===================

- Code cleanup for improved PEP 8 conformance.

- Add documentation and unit tests for using ``@cachedmethod`` with
  generic mutable mappings.

- Improve documentation.


v1.0.0 (2014-12-19)
===================

- Provide ``RRCache.choice`` property.

- Improve documentation.


v0.8.2 (2014-12-15)
===================

- Use a ``NestedTimer`` for ``TTLCache``.


v0.8.1 (2014-12-07)
===================

- Deprecate ``Cache.getsize()``.


v0.8.0 (2014-12-03)
===================

- Ignore ``ValueError`` raised on cache insertion in decorators.

- Add ``Cache.getsize()``.

- Add ``Cache.__missing__()``.

- Feature freeze for `v1.0`.


v0.7.1 (2014-11-22)
===================

- Fix `MANIFEST.in`.


v0.7.0 (2014-11-12)
===================

- Deprecate ``TTLCache.ExpiredError``.

- Add `choice` argument to ``RRCache`` constructor.

- Refactor ``LFUCache``, ``LRUCache`` and ``TTLCache``.

- Use custom ``NullContext`` implementation for unsynchronized
  function decorators.


v0.6.0 (2014-10-13)
===================

- Raise ``TTLCache.ExpiredError`` for expired ``TTLCache`` items.

- Support unsynchronized function decorators.

- Allow ``@cachedmethod.cache()`` to return None


v0.5.1 (2014-09-25)
===================

- No formatting of ``KeyError`` arguments.

- Update ``README.rst``.


v0.5.0 (2014-09-23)
===================

- Do not delete expired items in TTLCache.__getitem__().

- Add ``@ttl_cache`` function decorator.

- Fix public ``getsizeof()`` usage.


v0.4.0 (2014-06-16)
===================

- Add ``TTLCache``.

- Add ``Cache`` base class.

- Remove ``@cachedmethod`` `lock` parameter.


v0.3.1 (2014-05-07)
===================

- Add proper locking for ``cache_clear()`` and ``cache_info()``.

- Report `size` in ``cache_info()``.


v0.3.0 (2014-05-06)
===================

- Remove ``@cache`` decorator.

- Add ``size``, ``getsizeof`` members.

- Add ``@cachedmethod`` decorator.


v0.2.0 (2014-04-02)
===================

- Add ``@cache`` decorator.

- Update documentation.


v0.1.0 (2014-03-27)
===================

- Initial release.