Some thoughts on programming stuff

Month: August 2018

Edit Rendition invisible in the Ribbon

If you happen to have the Edit Rendition invisible in the Ribbon in SharePoint and you did everything right when setting up the environment and enabling Blob Cache in your SharePoint site. Don’t worry, this blog post will help you with simple trick!

Image renditions are great when you want to provide content in different screens using specific dimensions to help people crop the image or focus in what matters most when presenting it. It’s not common to have problems with them as they add great value to your solution.

Complementing, Microsoft documentation says: “Image renditions enable you to render a single image in multiple ways. An image can be displayed in various sizes or with different cropping. The first time that an image is requested, SharePoint Server uses the specified image rendition to generate the image. When a user views a SharePoint site, the correctly sized version of the image is downloaded to the client computer. This reduces the size of the file that is downloaded to the client, which improves site performance. “.

Edit Rendition invisible in the Ribbon - Button invisible
Edit Renditions button not showing
Continue reading

Force Flush Blob Cache in SharePoint

If you need to force flush blob cache in SharePoint, this script is for you! It will ensure that every file once cache will be deleted and will force SharePoint on recreating it when it sometimes becomes corrupt.

After running this script, you will get back on track and the cache will be flushed. But be cautious! This script will only affect the server where it’s being executed. In cases where you have multiple web application servers working together, the script must be executed in each server. It is necessary because each server holds its personal folder where the assets will be stored and cached.

The Blob Cache is an important feature that must be used when you have heavy traffic with lots of anonymous users, or even if you need to explore Image Renditions (we have a blog post about some problems there too). You can find over the internet a lot of content about it, but I must say that exists some undocumented stuff about the topic that may have been lost in the history and it’s just present in some old books about SharePoint.

The Script to force flush Blob Cache

All the steps below are important to get things working again. Basically our script will delete the Folder where you have configured the Blob Cache to store the files, then we will call the Flush Blob Cache method offered by the SPWebApplication object from SharePoint. Finally, the iisreset is an important step because it will ensure that the everything is rewinded and refreshed.

That’s it! I hope this script can help you getting things on track, perfoming a force Flush Blob Cache in SharePoint and serving a good SharePoint Site with awesome performance to your users.

References:
Karine Bosch blog;
Microsoft documentation.

© 2024 wiliammbr's blog

Theme by Anders NorenUp ↑