Fixed some size related warnings by using NSInteger (which should always be the same size as a pointer).

I think the code is a bit dubious though - not sure why you can't store a boxed bool value in the cache instead. That should returns NULL if it's not been set, or an NSValue object if it has (which you can then convert into a BOOL).