Source

trac-ticketlinks / trac / cache.py

Author Commit Message Labels Comments Date
rblank
util: Moved concurrency utilities out of `trac.util` and into a separate module `trac.util.concurrency` to avoid circular dependencies. Added a few missing translation markers reported (with a patch) by nzoltan. Closes #9319.
Branches
trunk
cboos
Plugin admin: the currently selected db connector becomes a required component. To that end, replace the global list of components by the use of an optional `required` flag on the Component (if missing, equivalent to `False`).
Branches
trunk
cboos
Deprecate `Environment.get_db_cnx` in favor of `Environment.with_transaction` and `Environment.get_read_db()`.
Branches
trunk
cboos
As with #4465, be careful to reserve a db connection before acquiring a lock, instead of trying to obtain a connection within the critical section as this might lead to a deadlock.
Branches
trunk
cboos
cache: a few clean-ups to make the code more readable
Branches
trunk
rblank
db: Allow nesting `with_transaction()` without having to pass the database connection explicitly. This allowed greatly simplifying the cache code, which has been reduced to a single `@cached` decorator. Part of #9060.
Branches
trunk
rblank
db: Mostly cosmetic fixes related to #8751, and fixed #9059 as suggested in comment:1:ticket:9059.
Branches
trunk
cboos
Refactor transaction handling, using a with_transaction function decorator (paves the way for using `with transaction(env, db) as db` in future versions of Trac). Many thanks to Jan Schukat for this exhaustive patch. Main part of #8751. (contains the fix for the usage of `with_transaction` in `RepositoryCache.sync_changeset`)
Branches
trunk
rblank
0.12dev: Improved the plugin admin panel to provide better grouping of components by module, and to display the component and module docstrings as descriptions. Closes #8839.
Branches
trunk
rblank
0.12dev: Added some syntactic sugar for `CacheProxy.get()`, and made `WikiSystem.pages` a `set` for faster membership test.
Branches
trunk
rblank
0.12dev: Fixed the first cache update trigger, where `generation=0`. Closes #8242.
Branches
trunk
rblank
0.12dev: Renamed the `key` column of the `cache` table to `id` for MySQL compatibility, and changed the type of the `generation` column to `int`. '''For people who have already upgraded their database to version 22, this requires manual intervention on the database.''' You can either remove the `cache` table and re-create it by hand: {{{ DROP TABLE cache; CREATE TABLE cache ( id text PRIMARY KEY, generation int ); }}} (for SQLite; or the equivalent for your database) Or you can downgrade the database version, drop the `cache` table, and u…
Branches
trunk
rblank
0.12dev: Refactored various in-process caches into a `CacheManager` component as described in [wiki:TracDev/Proposals/CacheInvalidation]. '''This changeset increments the `db_version` to 22 and therefore requires an environment upgrade.'''
Branches
trunk