The invention discloses a method and
system for multi-level caching of a main thread shared by tasks in a
thread pool, and equipment. The method for multi-level caching of the main thread shared by the tasks in the thread poolcomprises the following steps: setting a multi-level cache query method; defining a
thread pool, and setting a task execution method in the
thread pool; starting a main thread, and caching the data to cache
middleware and local according to a multi-level cache query method; and creating a sub-task in a main thread, submitting the sub-task to a defined thread
pool, executing the sub-task, and obtaining data from the local. The
system for multi-level caching of the main thread shared by the tasks in the thread pooll comprises: a definition setting module which is used for setting a multi-level cache query method and is used for defining a thread
pool and setting a task execution method in the thread
pool; a command execution module which is used for starting a main thread and caching the data to the cache
middleware and the local according to a multi-level cache query method and is used for creating a sub-task in the main thread, submitting the sub-task to the defined thread pool, executing the sub-task and acquiring data from the local.