Related: fdo#80633 cache optimal size

Change-Id: Ic2c3aefebd3061d294f339c6d262a3c3e381fbe4
coverity#706240 Uncaught exception

Change-Id: Ie31f5e1ff74ff8b9f35d7ce08e1f02a780375890
coverity#706382 Uncaught exception

and

coverity#706377
coverity#706378
coverity#706382

Change-Id: I17f672e31867b1be77c16a8a6e121a8f67df7c90
coverity#706468 Uncaught exception

and

coverity#706469 Uncaught exception

Change-Id: Ia67d777b09ac7f72a94a9019765266854775c53f
coverity#706988 Uncaught exception

and

coverity#706989 Uncaught exception

Change-Id: I426ae26f69311effd60c0b60b7f4d677a2e35c80
coverity#735883 Unchecked dynamic_cast

Change-Id: I4dec526d78dfaa1d894ab1be205e58e1224fbf72
coverity#1038321 Unintended sign extension

and

coverity#1038320 Unintended sign extension
coverity#1038319 Unintended sign extension
coverity#1038318 Unintended sign extension
coverity#1038317 Unintended sign extension
coverity#1038316 Unintended sign extension
coverity#1038315 Unintended sign extension
coverity#1038314 Unintended sign extension

Change-Id: Ib8015baf8ffec48e1b2d6ce1e7ce284fb36303b0
coverity#735850 Dereference after null check

Change-Id: If164a92ed502502ce1b25ecddaa8852e83eb4f3c
coverity#735881 Dereference after null check

Change-Id: I2fd45dd0ab1e0bedca7e827886949beb3f494cad