I'll leave out the part of your question about "when the system powers off" because I can't make any sense of it.
There is a process called Mover that runs on a schedule. Daily in the middle of the night is the default but you can change that. Mover is intended to run during idle time.
Each user share has a Use cache setting which controls how that user share uses cache. Mover uses these settings to decide whether to move the share from cache to array, from array to cache, or to just skip that share.
There is Help in the webUI. You can toggle Help for the whole webUI using Help (?) in the main menu. You can also toggle help for a specific setting by clicking on its label.
Rather than explaining all the details of how Unraid uses cache, I will give you some links and you can ask more questions after reading them.
https://wiki.unraid.net/UnRAID_6/Overview#Cache
https://forums.unraid.net/topic/46802-faq-for-unraid-v6/page/2/#comment-537383