Browse Source

Shift cache plugin to proper namespace.

Former-commit-id: ec9b7a30b55fd541fc9fb2e0a0b3150333f9427c
Former-commit-id: 955738978d1ae021c15a2a330d20bce09974d5cd
af/merge-core
James South 11 years ago
parent
commit
f4115be5a5
  1. 8
      build/NuSpecs/ImageProcessor.Web.Plugins.AzureBlobCache.nuspec
  2. 10
      build/build.xml
  3. 0
      build/content/ImageProcessor.Web.Plugins.AzureBlobCache/config/imageprocessor/cache.config.transform
  4. 3
      build/content/imageprocessor.128.png
  5. 4
      src/ImageProcessor.Playground/ImageProcessor.Playground.csproj
  6. 7
      src/ImageProcessor.Web/Caching/CacheIndexer.cs
  7. 14
      src/ImageProcessor.sln
  8. 3
      src/Plugins/ImageProcessor.Web/ImageProcessor.Web.Plugins.AzureBlobCache/AzureBlobCache.cs
  9. 31
      src/Plugins/ImageProcessor.Web/ImageProcessor.Web.Plugins.AzureBlobCache/ImageProcessor.Web.Plugins.AzureBlobCache.csproj
  10. 0
      src/Plugins/ImageProcessor.Web/ImageProcessor.Web.Plugins.AzureBlobCache/Properties/AssemblyInfo.cs
  11. 0
      src/Plugins/ImageProcessor.Web/ImageProcessor.Web.Plugins.AzureBlobCache/packages.config
  12. 4
      src/TestWebsites/MVC/Test_Website_MVC.csproj
  13. 2
      src/packages/repositories.config

8
build/NuSpecs/ImageProcessor.Web.AzureBlobCache.nuspec → build/NuSpecs/ImageProcessor.Web.Plugins.AzureBlobCache.nuspec

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>ImageProcessor.Web.AzureBlobCache</id>
<id>ImageProcessor.Web.Plugins.AzureBlobCache</id>
<version>1.0.0.0</version>
<title>ImageProcessor.Web.AzureBlobCache</title>
<title>ImageProcessor.Web.Plugins.AzureBlobCache</title>
<authors>James South</authors>
<owners>James South</owners>
<projectUrl>http://imageprocessor.org</projectUrl>
@ -34,7 +34,7 @@ Feedback is always welcome</description>
</dependencies>
</metadata>
<files>
<file src="..\content\ImageProcessor.Web.AzureBlobCache\config\imageprocessor\cache.config.transform" target="content\config\imageprocessor\cache.config.transform" />
<file src="..\_BuildOutput\ImageProcessor.Web.AzureBlobCache\lib\net45\ImageProcessor.Web.Caching.AzureBlobCache.dll" target="lib\net45\ImageProcessor.Web.Caching.AzureBlobCache.dll" />
<file src="..\content\ImageProcessor.Web.Plugins.AzureBlobCache\config\imageprocessor\cache.config.transform" target="content\config\imageprocessor\cache.config.transform" />
<file src="..\_BuildOutput\ImageProcessor.Web.Plugins.AzureBlobCache\lib\net45\ImageProcessor.Web.Plugins.AzureBlobCache.dll" target="lib\net45\ImageProcessor.Web.Plugins.AzureBlobCache.dll" />
</files>
</package>

10
build/build.xml

@ -23,14 +23,14 @@
</project>
<project>
<name>ImageProcessor Web Azure Blob Cache</name>
<name>ImageProcessor Web Azure Blob Cache plugin</name>
<version>1.0.0.0</version>
<folder>..\src\ImageProcessor.Web.AzureBlobCache</folder>
<projfile>ImageProcessor.Web.AzureBlobCache.csproj</projfile>
<folder>..\src\Plugins\ImageProcessor.Web\ImageProcessor.Web.Plugins.AzureBlobCache</folder>
<projfile>ImageProcessor.Web.Plugins.AzureBlobCache.csproj</projfile>
<outputs>
<output folder="ImageProcessor.Web.AzureBlobCache\lib\net45" />
<output folder="ImageProcessor.Web.Plugins.AzureBlobCache\lib\net45" />
</outputs>
<nuspec>ImageProcessor.Web.AzureBlobCache.nuspec</nuspec>
<nuspec>ImageProcessor.Web.Plugins.AzureBlobCache.nuspec</nuspec>
</project>
<project>

0
build/content/ImageProcessor.Web.AzureBlobCache/config/imageprocessor/cache.config.transform → build/content/ImageProcessor.Web.Plugins.AzureBlobCache/config/imageprocessor/cache.config.transform

3
build/content/imageprocessor.128.png

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:895ce5d9c5a733a68dccfac1b9f8cd4daed3a0ce2d9f1f8e21ba3aa113dbfe42
size 5747

4
src/ImageProcessor.Playground/ImageProcessor.Playground.csproj

@ -55,9 +55,9 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ImageProcessor.Web.AzureBlobCache\ImageProcessor.Web.AzureBlobCache.csproj">
<ProjectReference Include="..\Plugins\ImageProcessor.Web\ImageProcessor.Web.Plugins.AzureBlobCache\ImageProcessor.Web.Plugins.AzureBlobCache.csproj">
<Project>{3c805e4c-d679-43f8-8c43-8909cdb4d4d7}</Project>
<Name>ImageProcessor.Web.AzureBlobCache</Name>
<Name>ImageProcessor.Web.Plugins.AzureBlobCache</Name>
</ProjectReference>
<ProjectReference Include="..\ImageProcessor.Web\ImageProcessor.Web.csproj">
<Project>{d011a778-59c8-4bfa-a770-c350216bf161}</Project>

7
src/ImageProcessor.Web/Caching/CacheIndexer.cs

@ -64,17 +64,18 @@ namespace ImageProcessor.Web.Caching
/// </returns>
public static CachedImage Add(CachedImage cachedImage)
{
// Add the CachedImage with a sliding expiration of 10 minutes.
CacheItemPolicy policy = new CacheItemPolicy { SlidingExpiration = new TimeSpan(0, 10, 0) };
if (new Uri(cachedImage.Path).IsFile)
{
// Add the CachedImage.
CacheItemPolicy policy = new CacheItemPolicy();
policy.ChangeMonitors.Add(new HostFileChangeMonitor(new List<string> { cachedImage.Path }));
MemCache.AddItem(Path.GetFileNameWithoutExtension(cachedImage.Key), cachedImage, policy);
}
else
{
MemCache.AddItem(Path.GetFileNameWithoutExtension(cachedImage.Key), cachedImage);
MemCache.AddItem(Path.GetFileNameWithoutExtension(cachedImage.Key), cachedImage, policy);
}
return cachedImage;

14
src/ImageProcessor.sln

@ -28,7 +28,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Playground",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web.PostProcessor", "ImageProcessor.Web.PostProcessor\ImageProcessor.Web.PostProcessor.csproj", "{55D08737-7D7E-4995-8892-BD9F944329E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web.AzureBlobCache", "ImageProcessor.Web.AzureBlobCache\ImageProcessor.Web.AzureBlobCache.csproj", "{3C805E4C-D679-43F8-8C43-8909CDB4D4D7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web.Plugins.AzureBlobCache", "Plugins\ImageProcessor.Web\ImageProcessor.Web.Plugins.AzureBlobCache\ImageProcessor.Web.Plugins.AzureBlobCache.csproj", "{3C805E4C-D679-43F8-8C43-8909CDB4D4D7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B5217BED-B0B7-408E-81B7-877DE2BF9036}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{5D12E196-FB7A-4D97-B156-56901EF8084D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -197,6 +201,14 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{2CF69699-959A-44DC-A281-4E2596C25043} = {5D12E196-FB7A-4D97-B156-56901EF8084D}
{961340C8-8C93-401D-A0A2-FF9EC61E5260} = {B5217BED-B0B7-408E-81B7-877DE2BF9036}
{633B1C4C-4823-47BE-9A01-A665F3118C8C} = {B5217BED-B0B7-408E-81B7-877DE2BF9036}
{F6A208E9-C18F-43E9-B051-3C6EED30FDAF} = {B5217BED-B0B7-408E-81B7-877DE2BF9036}
{C7D1F0DD-CBD6-4127-82B4-51949EFF0BF5} = {5D12E196-FB7A-4D97-B156-56901EF8084D}
{3C805E4C-D679-43F8-8C43-8909CDB4D4D7} = {5D12E196-FB7A-4D97-B156-56901EF8084D}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = ImageProcessorConsole\ImageProcessorConsole.csproj
EndGlobalSection

3
src/ImageProcessor.Web.AzureBlobCache/AzureBlobCache.cs → src/Plugins/ImageProcessor.Web/ImageProcessor.Web.Plugins.AzureBlobCache/AzureBlobCache.cs

@ -9,7 +9,7 @@
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace ImageProcessor.Web.Caching
namespace ImageProcessor.Web.Plugins.AzureBlobCache
{
using System;
using System.Collections.Generic;
@ -21,6 +21,7 @@ namespace ImageProcessor.Web.Caching
using System.Threading.Tasks;
using System.Web;
using ImageProcessor.Web.Caching;
using ImageProcessor.Web.Extensions;
using ImageProcessor.Web.Helpers;
using ImageProcessor.Web.HttpModules;

31
src/ImageProcessor.Web.AzureBlobCache/ImageProcessor.Web.AzureBlobCache.csproj → src/Plugins/ImageProcessor.Web/ImageProcessor.Web.Plugins.AzureBlobCache/ImageProcessor.Web.Plugins.AzureBlobCache.csproj

@ -7,8 +7,8 @@
<ProjectGuid>{3C805E4C-D679-43F8-8C43-8909CDB4D4D7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ImageProcessor.Web.Caching</RootNamespace>
<AssemblyName>ImageProcessor.Web.Caching.AzureBlobCache</AssemblyName>
<RootNamespace>ImageProcessor.Web.Plugins.AzureBlobCache</RootNamespace>
<AssemblyName>ImageProcessor.Web.Plugins.AzureBlobCache</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
@ -32,34 +32,33 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Data.Edm">
<HintPath>..\packages\Microsoft.Data.Edm.5.6.2\lib\net40\Microsoft.Data.Edm.dll</HintPath>
<Private>True</Private>
<Reference Include="Microsoft.Data.Edm, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Data.Edm.5.6.2\lib\net40\Microsoft.Data.Edm.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Data.OData">
<HintPath>..\packages\Microsoft.Data.OData.5.6.2\lib\net40\Microsoft.Data.OData.dll</HintPath>
<Private>True</Private>
<Reference Include="Microsoft.Data.OData, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Data.OData.5.6.2\lib\net40\Microsoft.Data.OData.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Data.Services.Client, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.Data.Services.Client.5.6.2\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Data.Services.Client.5.6.2\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Configuration">
<HintPath>..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Storage">
<HintPath>..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
<HintPath>..\..\..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Spatial, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.Spatial.5.6.2\lib\net40\System.Spatial.dll</HintPath>
<HintPath>..\..\..\packages\System.Spatial.5.6.2\lib\net40\System.Spatial.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
@ -73,7 +72,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ImageProcessor.Web\ImageProcessor.Web.csproj">
<ProjectReference Include="..\..\..\ImageProcessor.Web\ImageProcessor.Web.csproj">
<Project>{d011a778-59c8-4bfa-a770-c350216bf161}</Project>
<Name>ImageProcessor.Web</Name>
</ProjectReference>

0
src/ImageProcessor.Web.AzureBlobCache/Properties/AssemblyInfo.cs → src/Plugins/ImageProcessor.Web/ImageProcessor.Web.Plugins.AzureBlobCache/Properties/AssemblyInfo.cs

0
src/ImageProcessor.Web.AzureBlobCache/packages.config → src/Plugins/ImageProcessor.Web/ImageProcessor.Web.Plugins.AzureBlobCache/packages.config

4
src/TestWebsites/MVC/Test_Website_MVC.csproj

@ -152,9 +152,9 @@
<Content Include="Views\Home\Index.cshtml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ImageProcessor.Web.AzureBlobCache\ImageProcessor.Web.AzureBlobCache.csproj">
<ProjectReference Include="..\..\Plugins\ImageProcessor.Web\ImageProcessor.Web.Plugins.AzureBlobCache\ImageProcessor.Web.Plugins.AzureBlobCache.csproj">
<Project>{3c805e4c-d679-43f8-8c43-8909cdb4d4d7}</Project>
<Name>ImageProcessor.Web.AzureBlobCache</Name>
<Name>ImageProcessor.Web.Plugins.AzureBlobCache</Name>
</ProjectReference>
<ProjectReference Include="..\..\ImageProcessor.Web.PostProcessor\ImageProcessor.Web.PostProcessor.csproj">
<Project>{55d08737-7d7e-4995-8892-bd9f944329e6}</Project>

2
src/packages/repositories.config

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\ImageProcessor.UnitTests\packages.config" />
<repository path="..\ImageProcessor.Web.AzureBlobCache\packages.config" />
<repository path="..\ImageProcessor.Web.UnitTests\packages.config" />
<repository path="..\Plugins\ImageProcessor.Web\ImageProcessor.Web.Plugins.AzureBlobCache\packages.config" />
<repository path="..\TestWebsites\MVC\packages.config" />
</repositories>
Loading…
Cancel
Save