mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 18:57:28 -07:00
Removed System.Web dependency by creating our own cache. This fixes the problem that Greenshot doesn't work if a .NET Client Profile is installed.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1810 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
761b02df4d
commit
9017331dc5
6 changed files with 211 additions and 160 deletions
|
@ -102,7 +102,7 @@ namespace Confluence {
|
|||
private ConfluenceSoapServiceService confluence;
|
||||
private int timeout;
|
||||
private string url;
|
||||
private CacheHelper<RemotePage> pageCache = new CacheHelper<RemotePage>("confluencepage", 60*config.Timeout);
|
||||
private Cache<string, RemotePage> pageCache = new Cache<string, RemotePage>(60 * config.Timeout);
|
||||
|
||||
public ConfluenceConnector(string url, int timeout) {
|
||||
this.url = url;
|
||||
|
@ -210,8 +210,8 @@ namespace Confluence {
|
|||
public Page getPage(string spaceKey, string pageTitle) {
|
||||
RemotePage page = null;
|
||||
string cacheKey = spaceKey + pageTitle;
|
||||
if (pageCache.Exists(cacheKey)) {
|
||||
page = pageCache.Get(cacheKey);
|
||||
if (pageCache.Contains(cacheKey)) {
|
||||
page = pageCache[cacheKey];
|
||||
}
|
||||
if (page == null) {
|
||||
checkCredentials();
|
||||
|
@ -225,8 +225,8 @@ namespace Confluence {
|
|||
RemotePage page = null;
|
||||
string cacheKey = "" + pageId;
|
||||
|
||||
if (pageCache.Exists(cacheKey)) {
|
||||
page = pageCache.Get(cacheKey);
|
||||
if (pageCache.Contains(cacheKey)) {
|
||||
page = pageCache[cacheKey];
|
||||
}
|
||||
if (page == null) {
|
||||
checkCredentials();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue