Setup is a Linux box running apache with apc. TwoLevels-Cache is planned as apc + file. Does Zend two level cache save everything to second level even the data kept in first level?
I was wondering what happens if I restart my server. Will the data in the first level apc cache be lost or can it be retrieved from second level file cache?
From the look of the code, the answer is "it depends". Data will be stored in both caches if the priority is high enough and the fast cache is not full or filling fast. Otherwise it will only be stored in the 'slow' cache.
However I'm sure that the APC cache would be empty after a reboot. There wouldn't be any sensible way for PHP to detect this and warm that cache back up for you, and no real reason for it to. Your app should not rely on cache data being present, and should regenerate it if it is missing.