Currently, the semaphore ID used by WP Super Cache is fixed at 5419 unless the user edits it. This causes problems on shared hosting: it only works for one user per server, and the second user has to modify it.
What’s worse, it might work when someone initially installs WP Super Cache, but start failing after the server is restarted if another user gets “first grab” at the semaphore after the restart. (I’ve seen this happen.)
I’d like to suggest something like the patch at:
It automatically chooses a unique semaphore id based on the cache directory path, which should be unique per user on the server. This should mean that two users on the same server can use it without conflicts.
Note that this is untested on Windows (it’s only been tested on Linux). In particular, before using it, someone should test whether the allowed range of the id passed to the sem_get function is (at least) 31 bits, as it is on Linux.
- The topic ‘Suggestion: WP Super Cache could calculate a unique semaphore id’ is closed to new replies.