/// Creates the series of directories required to house our cached images.
/// The images are stored in paths that are based upon the MD5 of their full request path
/// taking the first and last characters of the hash to determine their location.
/// <example>~/cache/a/1/ab04g67p91.jpg</example>
/// This allows us to store 36 folders within 36 folders giving us a total of 12,960,000 images.
/// </summary>
/// <returns>
/// True if the directories are successfully created; otherwise, false.
/// </returns>
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed. Suppression is OK here.")]
internalstaticboolCreateDirectories()
{
boolsuccess=true;
try
{
// Split up our characters into an array to loop though.
/// Gets the full transformed cached path for the image.
/// The images are stored in paths that are based upon the MD5 of their full request path
/// taking the first and last characters of the hash to determine their location.
/// <example>~/cache/a/1/ab04g67p91.jpg</example>
/// This allows us to store 36 folders within 36 folders giving us a total of 12,960,000 images.
/// The images are stored in paths that are based upon the sha1 of their full request path
/// taking the individual characters of the hash to determine their location.
/// This allows us to store 40 folders within 40 folders giving us a total of 3.0223145e+64 potential images.
/// Answers on a post card if you can figure out a way to store their details in a db for fast recovery.
/// </summary>
/// <returns>The full cached path for the image.</returns>
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed. Suppression is OK here.")]