Fixed cache key creation and added a test with stored procedures (see
SPTest)