#1 Made the settings cache buffer local.

Also commited to the folding standard many plugin use.