I have no insight into the nature of the course cache or its purpose, but I do want to thank you for the tip on adding rebuild_course_cache() to your functionality, since I'm building a very similar tool and I was having exactly the same problem. I haven't tested it with the rebuild_course_cache() function yet, but I am optimistic that it will work.
Roles and permissions
module instance only visible to admins
This discussion has been locked so you can no longer reply to it.