Rather than using our own lock system, we should just the use the one that comes with Drupal 6.16, if its around.

Attached is a patch that does just that.

This will fix the issue that the locking system doesn't really work on Windows.

CommentFileSizeAuthor
cacherouter-lock.patch1.33 KBsteven jones

Comments

andypost’s picture

Status: Active » Needs work

It's impossible to work with db-locking because cacherouter operates before DB initialized

So this could be applied only for DB engine

miro_dietiker’s picture

From what i understood, drupal core locking system (lock_acquire, lock_release) is a locking system that is intended to be low-volume.
Typically it is used for rebuilds that need to be done in rare cases.

I'd expect using this locking system could even lead to worse experience than without cacherouter:
Every write to the cache would result in acquiring a lock.
However, even getting cache content results in acquiring a lock for every key. (function get())..
Thus - to potentially avoid a DB query and fetching the cache, we'd initiate an additional DB query (lock_acquire) plus the addioverhead setup.

Am i wrong?