slapos_crm: Ensure you are comparing integers when get value from preference

Also define a short cache, to prevent creation explosion
Status Job ID Name Coverage
  External
failed SlapOS.Eggs.UnitTest-Master.Python2

00:15:04

failed SlapOS.Eggs.UnitTest-Master.Python3

00:15:22

failed SlapOS.Eggs.UnitTest-Master.Python2

00:12:32

failed SlapOS.Eggs.UnitTest-Master.Python3

00:10:24