Add new hooks and remove extra cache call

Added a few hooks and cleaned up the cache usage to the upload_attachment() functions.