The difference is when you should use them.
The Cache::restoreLock('lock-name', $this->owner)->release()
let's you retrieve the lock only if its the owner the one that's asking. This could be useful in cases in which your users can perform operations, but only them can cancel them. For example you could use this to cancel a mass-deletion operation in a mailing app. Only the user (the owner) is allowed to cancel a bulk delete cancelling the job and releasing its lock.
On the other hand, the forceRelease()
let's you release a lock without taking into account who performs this operation. You have a good example of use in Mohamed Said's blog (here you can read it in full):
Each time a product is updated, we want to dispatch a job that updates the search index. If several products were updated during a short period of time, we don't want to dispatch multiple jobs. There should be only a single index update job in the queue at any time.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…