Skip to content

Commit

Permalink
Merge pull request #60 from dotnetcore/dev
Browse files Browse the repository at this point in the history
Named Caching Provider
  • Loading branch information
catcherwong authored Dec 14, 2018
2 parents 48be320 + fa69e57 commit 194dc50
Show file tree
Hide file tree
Showing 36 changed files with 1,444 additions and 251 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ script:
- if test "$TRAVIS_OS_NAME" == "linux"; then dotnet restore; fi
- if test "$TRAVIS_OS_NAME" == "osx"; then dotnet restore --disable-parallel; fi
- dotnet build -c Release
- if test "$TRAVIS_OS_NAME" == "linux"; then dotnet test -c Release ./test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj; fi
#- if test "$TRAVIS_OS_NAME" == "linux"; then dotnet test -c Release ./test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj; fi
96 changes: 48 additions & 48 deletions EasyCaching.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Core", "src\Eas
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.InMemory", "src\EasyCaching.InMemory\EasyCaching.InMemory.csproj", "{B9490432-737B-4518-B851-9D40FD29B392}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.SQLite", "src\EasyCaching.SQLite\EasyCaching.SQLite.csproj", "{09FCF125-522E-4C0F-9CF0-0377A3F2A1A0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Redis", "src\EasyCaching.Redis\EasyCaching.Redis.csproj", "{7F72FA56-C4E8-4EF5-963D-FC4174453574}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Memcached", "src\EasyCaching.Memcached\EasyCaching.Memcached.csproj", "{D5626647-1E42-4584-BC42-354D8BD94FE7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.UnitTests", "test\EasyCaching.UnitTests\EasyCaching.UnitTests.csproj", "{93E7EF96-D44A-4400-BA75-169C0F3FDAC5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Serialization.MessagePack", "src\EasyCaching.Serialization.MessagePack\EasyCaching.Serialization.MessagePack.csproj", "{50D8C42C-1BC0-4133-8B70-63A6649DBD74}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Interceptor.AspectCore", "src\EasyCaching.Interceptor.AspectCore\EasyCaching.Interceptor.AspectCore.csproj", "{BED4832E-A790-42A6-978D-E0C1A215E638}"
Expand All @@ -29,21 +21,29 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Bus.RabbitMQ",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Interceptor.Castle", "src\EasyCaching.Interceptor.Castle\EasyCaching.Interceptor.Castle.csproj", "{7B55B6D9-4221-4E82-AED6-BEC9A60C99D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.HybridCache", "src\EasyCaching.HybridCache\EasyCaching.HybridCache.csproj", "{013F6582-CF26-4F5A-BE0B-B383347CF656}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Serialization.Json", "src\EasyCaching.Serialization.Json\EasyCaching.Serialization.Json.csproj", "{F0302BE8-188A-4EAF-8391-514CA9352DB3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Serialization.Protobuf", "src\EasyCaching.Serialization.Protobuf\EasyCaching.Serialization.Protobuf.csproj", "{3AAEDDBA-5037-4061-84E5-667F89C11F8E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.PerformanceTests", "test\EasyCaching.PerformanceTests\EasyCaching.PerformanceTests.csproj", "{0631F74C-8AFA-4B16-A50F-A5E437226265}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.ResponseCaching", "src\EasyCaching.ResponseCaching\EasyCaching.ResponseCaching.csproj", "{261EE728-4965-4C0E-B99B-3B188442263A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Demo.Providers", "sample\EasyCaching.Demo.Providers\EasyCaching.Demo.Providers.csproj", "{4193DF5A-E034-4917-83F4-380E8D7DCF83}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Demo.Interceptors", "sample\EasyCaching.Demo.Interceptors\EasyCaching.Demo.Interceptors.csproj", "{F7DD4826-1375-42B3-97BA-37685460282E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Demo.ResponseCaching", "sample\EasyCaching.Demo.ResponseCaching\EasyCaching.Demo.ResponseCaching.csproj", "{2AFDA79E-C034-4BC2-921D-5C7082924281}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.SQLite", "src\EasyCaching.SQLite\EasyCaching.SQLite.csproj", "{50089D69-50CF-49B7-8939-59C309A22336}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Redis", "src\EasyCaching.Redis\EasyCaching.Redis.csproj", "{F58E5C6F-407F-4E80-9282-2028E9810F55}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Memcached", "src\EasyCaching.Memcached\EasyCaching.Memcached.csproj", "{709D2333-42A7-45E6-B175-E630DCC1D807}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.HybridCache", "src\EasyCaching.HybridCache\EasyCaching.HybridCache.csproj", "{18DB08CD-B8CC-4409-9C7C-2906BCAA8827}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Demo.ResponseCaching", "sample\EasyCaching.Demo.ResponseCaching\EasyCaching.Demo.ResponseCaching.csproj", "{76A5C2E3-6525-45A0-9CE7-649F3235A443}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.UnitTests", "test\EasyCaching.UnitTests\EasyCaching.UnitTests.csproj", "{2A8D7103-DF64-47B6-A406-8F8559AF7E7F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.PerformanceTests", "test\EasyCaching.PerformanceTests\EasyCaching.PerformanceTests.csproj", "{6EBE36A2-F128-4C63-B90A-B700D8C2F2E8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -59,22 +59,6 @@ Global
{B9490432-737B-4518-B851-9D40FD29B392}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9490432-737B-4518-B851-9D40FD29B392}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9490432-737B-4518-B851-9D40FD29B392}.Release|Any CPU.Build.0 = Release|Any CPU
{09FCF125-522E-4C0F-9CF0-0377A3F2A1A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09FCF125-522E-4C0F-9CF0-0377A3F2A1A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09FCF125-522E-4C0F-9CF0-0377A3F2A1A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09FCF125-522E-4C0F-9CF0-0377A3F2A1A0}.Release|Any CPU.Build.0 = Release|Any CPU
{7F72FA56-C4E8-4EF5-963D-FC4174453574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F72FA56-C4E8-4EF5-963D-FC4174453574}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F72FA56-C4E8-4EF5-963D-FC4174453574}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F72FA56-C4E8-4EF5-963D-FC4174453574}.Release|Any CPU.Build.0 = Release|Any CPU
{D5626647-1E42-4584-BC42-354D8BD94FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5626647-1E42-4584-BC42-354D8BD94FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5626647-1E42-4584-BC42-354D8BD94FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5626647-1E42-4584-BC42-354D8BD94FE7}.Release|Any CPU.Build.0 = Release|Any CPU
{93E7EF96-D44A-4400-BA75-169C0F3FDAC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{93E7EF96-D44A-4400-BA75-169C0F3FDAC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{93E7EF96-D44A-4400-BA75-169C0F3FDAC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{93E7EF96-D44A-4400-BA75-169C0F3FDAC5}.Release|Any CPU.Build.0 = Release|Any CPU
{50D8C42C-1BC0-4133-8B70-63A6649DBD74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50D8C42C-1BC0-4133-8B70-63A6649DBD74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50D8C42C-1BC0-4133-8B70-63A6649DBD74}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -95,10 +79,6 @@ Global
{7B55B6D9-4221-4E82-AED6-BEC9A60C99D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B55B6D9-4221-4E82-AED6-BEC9A60C99D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B55B6D9-4221-4E82-AED6-BEC9A60C99D2}.Release|Any CPU.Build.0 = Release|Any CPU
{013F6582-CF26-4F5A-BE0B-B383347CF656}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{013F6582-CF26-4F5A-BE0B-B383347CF656}.Debug|Any CPU.Build.0 = Debug|Any CPU
{013F6582-CF26-4F5A-BE0B-B383347CF656}.Release|Any CPU.ActiveCfg = Release|Any CPU
{013F6582-CF26-4F5A-BE0B-B383347CF656}.Release|Any CPU.Build.0 = Release|Any CPU
{F0302BE8-188A-4EAF-8391-514CA9352DB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0302BE8-188A-4EAF-8391-514CA9352DB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0302BE8-188A-4EAF-8391-514CA9352DB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -107,10 +87,6 @@ Global
{3AAEDDBA-5037-4061-84E5-667F89C11F8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AAEDDBA-5037-4061-84E5-667F89C11F8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AAEDDBA-5037-4061-84E5-667F89C11F8E}.Release|Any CPU.Build.0 = Release|Any CPU
{0631F74C-8AFA-4B16-A50F-A5E437226265}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0631F74C-8AFA-4B16-A50F-A5E437226265}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0631F74C-8AFA-4B16-A50F-A5E437226265}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0631F74C-8AFA-4B16-A50F-A5E437226265}.Release|Any CPU.Build.0 = Release|Any CPU
{261EE728-4965-4C0E-B99B-3B188442263A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{261EE728-4965-4C0E-B99B-3B188442263A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{261EE728-4965-4C0E-B99B-3B188442263A}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -123,30 +99,54 @@ Global
{F7DD4826-1375-42B3-97BA-37685460282E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7DD4826-1375-42B3-97BA-37685460282E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7DD4826-1375-42B3-97BA-37685460282E}.Release|Any CPU.Build.0 = Release|Any CPU
{2AFDA79E-C034-4BC2-921D-5C7082924281}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2AFDA79E-C034-4BC2-921D-5C7082924281}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AFDA79E-C034-4BC2-921D-5C7082924281}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AFDA79E-C034-4BC2-921D-5C7082924281}.Release|Any CPU.Build.0 = Release|Any CPU
{50089D69-50CF-49B7-8939-59C309A22336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50089D69-50CF-49B7-8939-59C309A22336}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50089D69-50CF-49B7-8939-59C309A22336}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50089D69-50CF-49B7-8939-59C309A22336}.Release|Any CPU.Build.0 = Release|Any CPU
{F58E5C6F-407F-4E80-9282-2028E9810F55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F58E5C6F-407F-4E80-9282-2028E9810F55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F58E5C6F-407F-4E80-9282-2028E9810F55}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F58E5C6F-407F-4E80-9282-2028E9810F55}.Release|Any CPU.Build.0 = Release|Any CPU
{709D2333-42A7-45E6-B175-E630DCC1D807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{709D2333-42A7-45E6-B175-E630DCC1D807}.Debug|Any CPU.Build.0 = Debug|Any CPU
{709D2333-42A7-45E6-B175-E630DCC1D807}.Release|Any CPU.ActiveCfg = Release|Any CPU
{709D2333-42A7-45E6-B175-E630DCC1D807}.Release|Any CPU.Build.0 = Release|Any CPU
{18DB08CD-B8CC-4409-9C7C-2906BCAA8827}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18DB08CD-B8CC-4409-9C7C-2906BCAA8827}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18DB08CD-B8CC-4409-9C7C-2906BCAA8827}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18DB08CD-B8CC-4409-9C7C-2906BCAA8827}.Release|Any CPU.Build.0 = Release|Any CPU
{76A5C2E3-6525-45A0-9CE7-649F3235A443}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76A5C2E3-6525-45A0-9CE7-649F3235A443}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76A5C2E3-6525-45A0-9CE7-649F3235A443}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76A5C2E3-6525-45A0-9CE7-649F3235A443}.Release|Any CPU.Build.0 = Release|Any CPU
{2A8D7103-DF64-47B6-A406-8F8559AF7E7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A8D7103-DF64-47B6-A406-8F8559AF7E7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A8D7103-DF64-47B6-A406-8F8559AF7E7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A8D7103-DF64-47B6-A406-8F8559AF7E7F}.Release|Any CPU.Build.0 = Release|Any CPU
{6EBE36A2-F128-4C63-B90A-B700D8C2F2E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6EBE36A2-F128-4C63-B90A-B700D8C2F2E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EBE36A2-F128-4C63-B90A-B700D8C2F2E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EBE36A2-F128-4C63-B90A-B700D8C2F2E8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{CE61FAA2-0233-451C-991D-4222ED61C84B} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{B9490432-737B-4518-B851-9D40FD29B392} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{09FCF125-522E-4C0F-9CF0-0377A3F2A1A0} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{7F72FA56-C4E8-4EF5-963D-FC4174453574} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{D5626647-1E42-4584-BC42-354D8BD94FE7} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{93E7EF96-D44A-4400-BA75-169C0F3FDAC5} = {EBB55F65-7D07-4281-8D5E-7B0CA88E1AD0}
{50D8C42C-1BC0-4133-8B70-63A6649DBD74} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{BED4832E-A790-42A6-978D-E0C1A215E638} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{07326A03-B144-469F-837B-31DD3E0EB1AC} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{265FB0C5-2C34-438D-B671-63836954EB5A} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{7B55B6D9-4221-4E82-AED6-BEC9A60C99D2} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{013F6582-CF26-4F5A-BE0B-B383347CF656} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{F0302BE8-188A-4EAF-8391-514CA9352DB3} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{3AAEDDBA-5037-4061-84E5-667F89C11F8E} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{0631F74C-8AFA-4B16-A50F-A5E437226265} = {EBB55F65-7D07-4281-8D5E-7B0CA88E1AD0}
{261EE728-4965-4C0E-B99B-3B188442263A} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{4193DF5A-E034-4917-83F4-380E8D7DCF83} = {F88D727A-9F9C-43D9-90B1-D4A02BF8BC98}
{F7DD4826-1375-42B3-97BA-37685460282E} = {F88D727A-9F9C-43D9-90B1-D4A02BF8BC98}
{2AFDA79E-C034-4BC2-921D-5C7082924281} = {F88D727A-9F9C-43D9-90B1-D4A02BF8BC98}
{50089D69-50CF-49B7-8939-59C309A22336} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{F58E5C6F-407F-4E80-9282-2028E9810F55} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{709D2333-42A7-45E6-B175-E630DCC1D807} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{18DB08CD-B8CC-4409-9C7C-2906BCAA8827} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{76A5C2E3-6525-45A0-9CE7-649F3235A443} = {F88D727A-9F9C-43D9-90B1-D4A02BF8BC98}
{2A8D7103-DF64-47B6-A406-8F8559AF7E7F} = {EBB55F65-7D07-4281-8D5E-7B0CA88E1AD0}
{6EBE36A2-F128-4C63-B90A-B700D8C2F2E8} = {EBB55F65-7D07-4281-8D5E-7B0CA88E1AD0}
EndGlobalSection
EndGlobal
89 changes: 48 additions & 41 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
version: 1.0.{build}
image: Visual Studio 2017 Preview
image:
- Ubuntu1804
- Visual Studio 2017
configuration: Release
clone_folder: C:\projects\easycaching\
clone_depth: 50

pull_requests:
do_not_increment_build_number: true
Expand All @@ -17,50 +19,55 @@ skip_commits:
- .travis.yml
- .gitignore

install:
#- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1" -OutFile "dotnet-install.ps1"
#- ps: .\dotnet-install.ps1 --Version 2.1.301
#- ps: dotnet --info
- cmd: >-
cd C:\projects\easycaching\tools\RedisConfigs\3.0.503
for:
-
matrix:
only:
- image: Visual Studio 2017
clone_folder: C:\projects\easycaching\

redis-server.exe --service-install --service-name "redis-6379" "..\Basic\master-6379.conf"
install:
- ps: cd c:\projects\easycaching\tools\RedisConfigs\3.0.503\
- ps: .\redis-server.exe --service-install --service-name "redis-6379" "..\Basic\master-6379.conf"
- ps: net start redis-6379
- ps: new-service –Name memcached1 –DisplayName memcached1 –BinaryPathName “c:\projects\easycaching\tools\memcached\memcached.exe -d runservice -m 64 -c 2048 -p 11211” –StartupType Automatic
- ps: new-service –Name memcached2 –DisplayName memcached2 –BinaryPathName “c:\projects\easycaching\tools\memcached\memcached.exe -d runservice -m 64 -c 2048 -p 11212” –StartupType Automatic
- ps: net start memcached1
- ps: net start memcached2
- ps: cd c:\projects\easycaching

before_build:
- ps: dotnet restore

net start redis-6379
build_script:
- ps: dotnet build -c Release

c:\projects\easycaching\tools\memcached\memcached.exe -d install
test_script:
- ps: dotnet test -c Release --no-build .\test\EasyCaching.UnitTests\EasyCaching.UnitTests.csproj

net start memcached
-
matrix:
only:
- image: Ubuntu1804

cd C:\projects\easycaching
before_build:
- cmd: dotnet restore
clone_folder: /home/appveyor/projects/easycaching

build:
project: EasyCaching.sln
parallel: true
verbosity: minimal

test_script:
- cmd: >-
dotnet test -c Release --no-build .\test\EasyCaching.UnitTests\EasyCaching.UnitTests.csproj
#before_test:
#- ps: >-
# nuget install coveralls.net -Version 0.7.0 -OutputDirectory tools

# nuget install OpenCover -Version 4.6.519 -OutputDirectory tools
services:
- redis

#test_script:
#- ps: tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:" test test\EasyCaching.UnitTests\EasyCaching.UnitTests.csproj -c Debug /p:DebugType=full" -register:user -filter:"+[EasyCaching*]* -[EasyCaching*Tests]*" -oldstyle -returntargetcode -output:coverage.xml
install:
#- sh: sudo apt-get install libevent libevent-deve
- sh: sudo apt-get install memcached
- sh: sudo memcached -p 11211 -u root -m 64m -d
- sh: sudo memcached -p 11212 -u root -m 64m -d

#after_test:
#- ps: >-
# if ($env:APPVEYOR_REPO_BRANCH -eq "master" -And -not $env:APPVEYOR_PULL_REQUEST_NUMBER)
# {
# tools\coveralls.net.0.7.0\tools\csmacnz.Coveralls.exe --opencover -i coverage.xml --serviceName appveyor --useRelativePaths
# }
# else
# {
# echo "not master branch...."
# }
before_build:
- sh: dotnet restore
build_script:
- sh: dotnet build -c Release
test_script:
- sh: dotnet test -c Release --no-build ./test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj

51 changes: 51 additions & 0 deletions sample/EasyCaching.Demo.Providers/Controllers/CusController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
namespace EasyCaching.Demo.Providers.Controllers
{
using EasyCaching.Core;
using Microsoft.AspNetCore.Mvc;
using System;

[Route("api/[controller]")]
public class CusController : Controller
{
private readonly IEasyCachingProviderFactory _factory;

public CusController(IEasyCachingProviderFactory factory)
{
this._factory = factory;
}

// GET api/cus/inmem?name=Default
[HttpGet]
[Route("inmem")]
public string Get(string name = EasyCachingConstValue.DefaultInMemoryName)
{
var provider = _factory.GetCachingProvider(name);
var val = name.Equals("cus") ? "cus" : "default";
var res = provider.Get("demo", () => val, TimeSpan.FromMinutes(1));
return $"cached value : {res}";
}

// GET api/cus/redis?name=Default
[HttpGet]
[Route("redis")]
public string GetRedis(string name = EasyCachingConstValue.DefaultRedisName)
{
var provider = _factory.GetCachingProvider(name);
var val = name.Equals("redis1") ? $"redis1-{Guid.NewGuid()}" : $"redis2-{Guid.NewGuid()}";
var res = provider.Get("named-provider", () => val, TimeSpan.FromMinutes(1));
return $"cached value : {res}";
}


// GET api/cus/com?name=Default
[HttpGet]
[Route("com")]
public string GetCom(string name = "cus")
{
var provider = _factory.GetCachingProvider(name);
var val = $"{name}-{Guid.NewGuid()}";
var res = provider.Get("named-provider2", () => val, TimeSpan.FromMinutes(1));
return $"cached value : {res}";
}
}
}
Loading

0 comments on commit 194dc50

Please sign in to comment.