Many times Ill be working on a large site like wpsnipp and you see a problem with a post or a page and you want to quickly make changes. This WordPress function will add an edit link directly to the post within the admin page so you can do just that.
If you are using a plugin like W3TC or other caching plugins when you add the above code to your theme it will not show or hide based on the user. So in order to make it work you need to use something called fragment caching. Rather than the above snippet add the following to your theme and you will have the best of both worlds.
<!-- mfunc edit_post_link(__('Edit')); --><!-- /mfunc -->