Added acf_debug function

Signed-off-by: Elliot Condon <e@elliotcondon.com>
Improved performance by caching get_fields results

Signed-off-by: Elliot Condon <e@elliotcondon.com>