profiling and cache php function