Added Memoise caching function to postgresql_connection