Commit graph

75 commits

Author SHA1 Message Date
Bertrand Bordage
861f20ed67 Handles .union, .intersection, & .difference. 2018-07-27 16:43:57 +02:00
Bertrand Bordage
74e000b8e2 Adds Django 2.0 support. 2018-05-04 20:26:26 +02:00
Bertrand Bordage
259b76291a Minor amends to #102. 2018-05-04 14:57:23 +02:00
Kosei Kitahara
df42746729
Remove EOL version specific macros 2018-04-17 14:51:41 +09:00
Bertrand Bordage
bc49fd18ea Multiple Python optimisations. 2017-06-07 08:59:35 +02:00
Bertrand Bordage
da4e21b515 Adds CACHALOT_DATABASES and removes dynamic setting support.
Dynamic setting support is removed because it’s not thread-safe.
2017-06-04 18:37:39 +02:00
Bertrand Bordage
8d334f9855 Python optimisations. 2017-06-03 19:53:01 +02:00
Bertrand Bordage
b5827cd936 Removes a useless check. 2017-06-03 18:47:06 +02:00
Bertrand Bordage
b634d18dc5 Correctly adds the long type. 2017-06-03 18:27:58 +02:00
Bertrand Bordage
2d5ad63fbd Adds the Python type long to the cachable param types. 2017-06-03 18:25:07 +02:00
Bertrand Bordage
412f82061e Prints again a debug line to understand why Travis CI is failing… -_- 2017-06-03 18:09:45 +02:00
Bertrand Bordage
4522106632 Supports RawSQL. 2017-06-03 17:59:21 +02:00
Bertrand Bordage
cb877355ac Adds bytearray to the list of cachable params. 2017-06-03 12:21:25 +02:00
Bertrand Bordage
799fbf28e0 Displays uncachable params to debug an issue only on Travis CI. 2017-06-03 12:07:53 +02:00
Bertrand Bordage
85ebf42353 Fixes Python 2. 2017-06-03 11:00:54 +02:00
Bertrand Bordage
f86a56d110 Fixes Django 1.11 compatibility. 2017-06-03 02:00:15 +02:00
David Jean Louis
179d8f2e21 Fixed django>=1.11 support.
Since Django 1.11 the ``query`` argument of the SQLCompiler constructor has always a ``subquery`` property, in fact if the SQL query has no real sub query it is set to False.
As a result, the test done by Django-cachalot in the ``_get_tables`` function is no more accurate and cause a dramatic slow down on 1.11 django installs.
This fix should be backwards compatible with older versions of Django.
2017-06-02 17:29:11 +02:00
Bertrand Bordage
f6cfeb6226 Stops automatically invalidating other caches than CACHALOT_CACHE.
This had a negative impact on performance, and it was not working reliably.
It is clearer to invalidate only `CACHALOT_CACHE`, and to detail what
to do in the docs when we change `CACHALOT_CACHE`.
2016-09-29 19:11:21 +02:00
Bertrand Bordage
c5d5ee7907 Never caches select_for_update queries. 2016-09-29 11:57:38 +02:00
Bertrand Bordage
246873b42f Don’t invalidate uncachable queries. 2016-09-07 00:44:51 +02:00
Bertrand Bordage
522b5af899 Use CACHALOT_TIMEOUT in 3 remaining places. 2016-09-06 23:21:01 +02:00
Bertrand Bordage
944ebb9b73 Removes old Django 1.7 code. 2016-07-21 12:19:31 +02:00
Bertrand Bordage
e0841077e2 Revert "Simplifies the cache key hashing."
This reverts commit beac70251f.
2016-02-17 19:38:41 +01:00
Bertrand Bordage
cfcd0f2805 Changes two documented types. 2016-01-12 11:42:57 +01:00
Bertrand Bordage
58fd71c925 Small Python optimisations & simplifications. 2016-01-11 22:57:42 +01:00
Bertrand Bordage
beac70251f Simplifies the cache key hashing. 2016-01-11 22:06:16 +01:00
Bertrand Bordage
3e7a9a0808 Prevents queries with Now from being cached. 2015-12-28 05:51:38 +01:00
Bertrand Bordage
3a97912f3d Handles and tests JSONField. 2015-12-28 03:14:57 +01:00
Bertrand Bordage
2ffe564e3e Fixes Django 1.7+1.8 compatibility. 2015-12-18 17:07:53 +01:00
Bertrand Bordage
746616b7b1 Fixes version number comparison. 2015-12-18 16:46:00 +01:00
Bertrand Bordage
885d68b008 Fixes Django 1.9 compatibility. 2015-12-18 15:56:28 +01:00
Bertrand Bordage
87ed73390f Tests and handles Decimal type in query parameters. 2015-10-28 17:08:03 +01:00
Bertrand Bordage
6d6bbdeb6f Tests FloatField and cache queries using it. 2015-10-28 16:51:26 +01:00
Bertrand Bordage
9cf0cd318a Adds tests for UUIDField and DurationField and cache their queries. 2015-10-28 16:19:33 +01:00
Bertrand Bordage
ce29686429 Handles IP address caching with PostgreSQL. 2015-10-28 16:16:15 +01:00
Bertrand Bordage
d959f3e42f Waits until the end of transaction before triggering the signal, and trigger the signal on all invalidations. 2015-10-28 12:54:39 +01:00
Bertrand Bordage
43bd5e1b38 Fixes the independence issue when nesting atomic block of different databases. 2015-10-26 02:42:13 +01:00
Bertrand Bordage
a8b77c6e32 Adds CACHALOT_ONLY_CACHABLE_TABLES. 2015-10-05 20:10:19 +02:00
Bertrand Bordage
3a6f7bbc29 Tests all django.contrib.postgres reading possibilities + makes caching work for most array and hstore queries. 2015-10-04 22:14:18 +02:00
Bertrand Bordage
f05b143e4c Tiny optimisation. 2015-10-04 21:02:10 +02:00
Bertrand Bordage
e72c6c5e85 Mark datetime types as valid SQL param types (for psycopg2). 2015-10-02 20:45:43 +02:00
Bertrand Bordage
9938b54123 Merge branch 'master' into django-1.8
Conflicts:
	cachalot/cache.py
	cachalot/monkey_patch.py
	cachalot/tests/read.py
	cachalot/utils.py
	tox.ini
2015-10-02 18:39:04 +02:00
Bertrand Bordage
4ae8bccf96 Fixes Python 3 compatibility. 2015-06-19 19:46:10 +02:00
Bertrand Bordage
709513db65 Avoids caching queries with an unknown parameter type.
This fixes #21.
2015-06-19 19:32:46 +02:00
Bertrand Bordage
7f86cfe1cc Python optimisations. 2015-06-18 03:07:04 +02:00
Bertrand Bordage
d9e19a8ca5 Simplifications. 2015-06-17 22:39:39 +02:00
Bertrand Bordage
5cc4d3ae93 Adds an UNCACHABLE_TABLES setting to fix some migrations issues in tests and significantly speed up tests. 2015-06-17 21:24:49 +02:00
Bertrand Bordage
a32f86ffb4 Optimizes automatic invalidation. 2015-05-24 19:34:24 +02:00
Bertrand Bordage
720480359b Stops caching queries with random subqueries. 2015-05-24 19:29:50 +02:00
Bertrand Bordage
e89fe83992 Fixes the AttributeError happening when excluding through a M2M on a multi-table inheritance child model. 2015-05-24 18:28:16 +02:00