locking file_put_contents + invalidation of php files