Split the entryCache variable and its class

Previously there were code tightly used the entryCache variable. Thus we
postpone the declearation of the entryCache variable. Moreover, we move
the static const size variable as its members.