1. A computer implemented method for thread-based cache content saving for task switching in a computer processor, the method comprising: based on a task switch in the computer processor from a first thread to a second thread: determining a cache entry in a cache of the computer processor that is owned by the first thread, wherein the determination is made based on a hardware thread identifier (ID) of the first thread matching a hardware thread ID in the cache entry; determining whether the determined cache entry is eligible for prefetching; and based on determining that the determined cache entry is eligible for prefetching, setting a marker in the cache entry to active.