Cfcache: Can't create file issue

We use a shared storage for creating cache files on demand, via cfcache (and other means). And we get handful of errors where the cfcache file creation fails and throws an error for the visitor.

From my understanding, the issue is due this:

  1. server 1 checks for the shared /cache/ folder for x123y cache file. It isn’t there.

  2. server 2 does the same.

  3. server 1 is a nanosecond ahead and creates the file

  4. server 2 tries, a nanosecond later, create the file and fails, throws an error.

Sure, we could name the cache files so that each server would have separate cache files, but that kinda moots the point of having a shared cache folder among the servers.

How should we tackle the issue?

Its a permissions issue, not a lucee issue

Check the file permissions for the created object, Nano Server 2 does not have permission to overwrite the created file Nano Server 1 created.