I started reading this apple sample for keychain and understood that they are fetching all the values for this keychain item associated to type kSecAttrGeneric. Then when someone tries to search for a key they do it form the cached value, is this the right approach, i somehow feel that this way of prefetching is incorrect.
Can you please let me know what could be the reason for prefetching all the data from keychain rather than taking accessing it directly from keychain based on the need.
https://developer.apple.com/library/ios/samplecode/GenericKeychain/Introduction/Intro.html