Commit graph

23 commits

Author SHA1 Message Date
Andrew-Chen-Wang
1d0a06a9ab Remove Python 2 and Django 2.2 code 2023-04-04 15:28:15 -04:00
Stepan Henek
6826ec6e4d
Fix cachalot_disabled (#174)
unused varialbe LOCAL_STORAGE.enabled was configured
instead of LOCAL_STORAGE.cachalot_enabled which is later used
to turn of the caching
2021-03-30 18:44:47 -04:00
Andrew-Chen-Wang
f02b7f57a2 v2.3.4 2021-03-22 23:12:35 -04:00
Andrew-Chen-Wang
d0b5213014 v2.3.3
* Fix a comment block disabling incorrectly RST form for cachalot_disabled
* Update CHANGELOG.rst
* Several points did I incorrectly say that 50 modifications per second was too much. It was supposed to say minute. You'd have to have a LARGE website to really get to that point since inserts from an external DB would typically take a 250-1000ms/1s per INSERT/UPDATE
* Add Python 3.9 support in the docs and setup.py
* Move chat to Discord and reflect in the docs
2020-11-08 21:01:14 -05:00
Andrew Chen Wang
f40a56dfe1
Add support for disabling cachalot (#158)
* This context manager allows for disabling cachalot using a context manager
* Allow for disabling all queries within context manager
2020-07-29 14:00:04 -04:00
Andrew-Chen-Wang
6e22dc7f58 Drop Python 2.7 and Dj 1.11 2020-06-18 09:28:00 -04:00
Andrew-Chen-Wang
602cdcee1d
Version 2.2.0 (#146)
This PR upgrades cachalot to version 2.2.0 allowing for anyone to install cachalot at any Django package above 1.11. All tests currently function now.

* Added mysql as a service to fix Travis CI

* Removed tox dependency

* Removed upper limit on Django and support 2.2-3.0 CI Test
* Cachalot will only say "officially supports" while removing upper limit to not hinder anyone's progress.
* Added Python 3.8 and Django 2.2 and 3.0 to CI tests

- Max is 200 and we'll get there quickly if we add another Python version. Utilizes #127
- Keep dependencies for six and django.utils.six

* Correctly run Travis test by updating tox.ini
* Originally using tox syntax but changed testenv to travis so that travis env and travis dependencies and stuff are used

* Tox tests should start running command

* testenv without dependencies broke travis. New spot in Tox
* testenv without dependencies broke travis
* I can't figure out where testenv is supposed to be
* Good thing there's squash

* Added missing six in test
* Also added six package to Tox for Django 3.0 coverage.
* The missing six package caused several problems in several tests due to using an incorrect DB

* Resolves #138
* Need to add the panels here in order to satisfy tests

* Adds CachalotPanel to Python 2 backwards compatibility
* Forgot super class took those like save()

* Added databases to certain test cases
* APITestCase, DebugToolbarTestCase, SignalsTestCase required a database set
* Fixes errors like these: https://travis-ci.org/noripyt/django-cachalot/jobs/648691385#L4892

* Dropped OFFICIAL support for Python 3.4 + MySQL
* MySQL and its client on 3.4 is f--king up a lot of the testing and I can't bear with it. We can revisit it later, but, honestly, who uses Python 3.4... and if an organization is, then they will either have no problem with Postgres and SQLite or know that MySQL doesn't work.

* Drop Py3.4 from running. Fixed databases
* Now goes with setting's databases rather than hardcoded since some tests don't have other databases.

* Fix ReadTestCase

Django 2.2+ changed self.queryset at line 1000 with self.query=queryset.query

* Django Dependency Removed from utils.py

* Last commit used Django version. This one used try except

* Fixed assertNumQuery; added allow_failures for 3.4
* Primary: More information in test_utils.py with method is_django_21_below_and_is_sqlite
* The problem with the entire build lie in the self.is_sqlite for the tests. SQLite will make 2 queries when creating or destroying or updating instead of 1.
* In summary, if SQLite is the DB and Django

* Changed build matrix to allow failures for 3.4 instead of taking it out completely so that we can get it to work soon.

* Remove -> From function return
* I love backwards compatibility

* SQLite2 in multi_db.py returned incorrect bool

* Django 2.1 and SQLite checker doesn't work for some tests
* Some tests DO HAVE the BEGIN query that is returned... Not sure why. If the next test show completely different WriteTestCase problems, then we need to find alternative.
* Removed check from atomic

* Adjust Django and is_sqlite errors
* CI testing the Tox errors: https://travis-ci.org/noripyt/django-cachalot?utm_medium=notification&utm_source=github_status

* Adjust Django and is_sqlite errors (590 CI)
* CI testing the Tox errors: https://travis-ci.org/noripyt/django-cachalot?utm_medium=notification&utm_source=github_status
* Adjustment 2

* Make include matrix and Adjust Django and is_sqlite errors (594 CI)
* CI testing the Tox errors: https://travis-ci.org/noripyt/django-cachalot?utm_medium=notification&utm_source=github_status
* Adjustment 3

* Adjust Django and is_sqlite errors (596 CI)
* CI testing the Tox errors: https://travis-ci.org/noripyt/django-cachalot?utm_medium=notification&utm_source=github_status
* Adjustment 4
* Added my intro to ReadTheDocs

* Adjust Django and is_sqlite errors (598 CI)
* CI testing the Tox errors: https://travis-ci.org/noripyt/django-cachalot?utm_medium=notification&utm_source=github_status
* Adjustment 5

* Drop Python 3.4 from tests since PyLibMC not cooperating at that level.

* Bump package version up 1 minor for Django 2.2 and 3.0
2020-02-12 00:52:12 -05:00
Petr Dlouhý
782f00300e fixes for Django 3.0 (#144)
Use six since django.utils.six is dropped.
2020-02-09 23:05:06 -05:00
Bertrand Bordage
66f6e2003c Allows specifying a schema name in Model._meta.db_table. 2018-06-14 15:23:17 +02:00
Bertrand Bordage
e750effa5a Allows specifying model lookups in API functions. 2017-06-04 19:45:39 +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
2b2c662deb Ensures we never send the signal during a transaction. 2016-09-29 13:55:40 +02: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
6249ade208 Improves documentation of the latest additions. 2015-10-25 00:47:24 +02:00
Bertrand Bordage
6c13636044 Creates get_last_invalidation(), while simplifying API usage. 2015-10-05 23:48:48 +02:00
Bertrand Bordage
abc00b1307 Merges invalidate_all, invalidate_tables and invalidate_models, while optimising it. 2015-10-05 22:31:47 +02:00
Bertrand Bordage
a504efc8a7 Simplification. 2015-06-17 21:22:22 +02:00
Bertrand Bordage
0c8180a6e7 Adds the invalidate_cachalot Django command. 2015-02-18 03:03:32 +01:00
Bertrand Bordage
abee1be5fb Typos in some docstrings. 2014-12-07 01:55:52 +01:00
Bertrand Bordage
45e4cd543b Rewrites invalidation for a better speed & memory performance. 2014-11-24 12:05:00 +01:00
Bertrand Bordage
83618b69cd Adds QUERY_KEYGEN & TABLE_KEYGEN. 2014-10-30 04:17:48 +01:00
Bertrand Bordage
bc31429394 Adds an API. 2014-10-28 22:41:51 +01:00