Commits

Jason Moiron committed 3bd6e14

bump version *down* to 0.2.1 for a release, which has been a long time coming frankly, and fixes many issues with the current 0.2

Comments (0)

Files changed (5)

 New in this version
 ~~~~~~~~~~~~~~~~~~~
 
-* `blacklist support <queryset_cache.html#settings>`_ (``MAN_IN_BLACKLIST``)
-* fix to allow unicode table & column names
-* fix bulk updates to correctly invalidate cache
+* many, many bugfixes
+* fixes for invalidation on queries that contain subselects in WHERE clauses
+* addition of `TransactionCommittingMiddleware <queryset_cache.html#using-with-transactionmiddleware>`_
+* python 2.4 support
 
 In Depth Documentation
 ~~~~~~~~~~~~~~~~~~~~~~

docs/queryset_cache.rst

 
 This problem is described in `django ticket #9964`_, but unfortunately fixing
 it isn't straightforward because the "correct" thing to do here is in dispute.
-Starting with version 0.3, Johnny includes a middleware called
+Starting with version 0.2.1, Johnny includes a middleware called
 ``johnny.middleware.CommittingTransactionMiddleware``, which is the same as
 the built in version, but always commits transactions on success.  Depending
 on your database, there are still ways to have SELECT statements modify data,

johnny/backends/filebased.py

 
 from django.core.cache.backends import filebased
 from django.utils.encoding import smart_str
+import django
 import sys
 
 # NOTE: We aren't using smart_str here, because the underlying library will
             timeout = sys.maxint
         return super(CacheClass, self).set(key, value, timeout)
 
-
+if django.VERSION[:2] < (1, 3):
+    class FileBasedCache(CacheClass):
+        pass

johnny/tests/web.py

         populate the cache properly."""
         connection.queries = []
         q = base.message_queue()
+        import ipdb; ipdb.set_trace();
         response = self.client.get('/test/template_queries')
         self.failUnless(q.get() is False)
         response = self.client.get('/test/template_queries')
 
 MANAGERS = ADMINS
 
-DATABASE_ENGINE = 'sqlite3'     # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-DATABASE_NAME = 'johnny-db.sql' # Or path to database file if using sqlite3.
-DATABASE_USER = ''              # Not used with sqlite3.
-DATABASE_PASSWORD = ''          # Not used with sqlite3.
-DATABASE_HOST = ''              # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = ''              # Set to empty string for default. Not used with sqlite3.
+if django.VERSION[:2] < (1, 3):
+    DATABASE_ENGINE = 'sqlite3'     # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+    DATABASE_NAME = 'johnny-db.sql' # Or path to database file if using sqlite3.
+    DATABASE_USER = ''              # Not used with sqlite3.
+    DATABASE_PASSWORD = ''          # Not used with sqlite3.
+    DATABASE_HOST = ''              # Set to empty string for localhost. Not used with sqlite3.
+    DATABASE_PORT = ''              # Set to empty string for default. Not used with sqlite3.
+else:
+    DATABASES = {
+        'default' : {
+            'ENGINE' : 'django.db.backends.sqlite3',
+            'NAME' : 'johnny-db.sql',
+        }
+    }
 
 # Local time zone for this installation. Choices can be found here:
 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
 # trailing slash.
 # Examples: "http://foo.com/media/", "/media/".
 ADMIN_MEDIA_PREFIX = '/media/'
+
 if django.VERSION[:2] < (1, 3):
     CACHE_BACKEND="johnny.backends.locmem://"
     #CACHE_BACKEND="johnny.backends.memcached://localhost:11211/"