Introducing polymorphic function cache (ported from phalcon 1.3)