srchub

srchub Commit Details


Date:2016-04-23 15:28:24 (8 years 7 months ago)
Author:Natalie Adams
Branch:master
Commit:490ce3dd080c4516550980946a62c8315172a965
Parents: 3f699e0afddab7f35cf88b8be446cddbeaa0c013
Message:Issue 152: Add cache for project info

Changes:

File differences

indefero/src/IDF/Conf.php
108108
109109
110110
111
111112
112113
113114
$conf->vdesc = $value;
$conf->create();
$this->initCache();
$this->_project->invalidateConfCache();
}
function getVal($key, $default='')
indefero/src/IDF/Project.php
161161
162162
163163
164
165
166
167
168
169
170
171
164172
165173
166174
......
670678
671679
672680
673
681
682
683
684
685
686
687
688
674689
675690
676691
);
}
public function invalidateConfCache() {
$cache = Pluf_Cache::factory();
$keys = $this->getConf()->getKeys();
foreach($keys as $key) {
$cache->set("confCache" . $this->id . $key, null);
}
}
/**
* String representation of the abstract.
return parent::__get($key);
}
catch (Exception $e) {
return $this->getConf()->getVal($key);
$cache = Pluf_Cache::factory();
if (null === ($confCache = $cache->get("confCache" . $this->id . $key, null))) {
$confCache = $this->getConf()->getVal($key);
$cache->set("confCache" . $this->id . $key, $confCache);
return $confCache;
} else {
return $confCache;
}
}
}
indefero/src/IDF/templates/idf/main-menu.html
1010
1111
1212
13
1413
14
1515
1616
1717
18
19
20
18
19
20
21
22
23
2124
2225
2326
{/if}{if $customForgePageEnabled}
<li><a href="{url 'IDF_Views::index'}">{trans 'Home'}</a></li>
{/if}<li id="project-list"><a href="{url 'IDF_Views::listProjects'}">{trans 'Project List'} &#x25be;</a>
{if $allProjects.count() != 0}
{if $allProjects.count() != 0}
<ul class="prjlistclass">
<li id="searchkeep"><input size="15" type="text" id="prjname" name="prjname" placeholder="Project Name..." /></li>
{foreach $allProjects as $p}
<li class="projectitem"><a href="{url 'IDF_Views_Project::home', array($p.shortname)}"><img src="{media '/idf/img/no_logo.png'}" data-logo="{$p.logo}" class="logo" data-src="{url 'IDF_Views_Project::logo64', array($p.shortname)}" alt="{trans 'Project logo'}" />{if $p.private}<img class="lock" src="{media '/idf/img/lock.png'}" alt="{trans 'Private project'}" />{/if}{$p}</a></li>
{/foreach}</ul>
{/if}</li>{if $isAdmin}<li><a href="{url 'IDF_Views_Admin::forge'}">{trans 'Forge Management'} {if $pendingProjects > 0}({$pendingProjects}){/if}</a></li>{/if}<li>
<li class="projectitem"><a href="{url 'IDF_Views_Project::home', array($p.shortname)}"><img src="{media '/idf/img/no_logo.png'}" data-logo="{$p.logo}" class="logo" data-src="{url 'IDF_Views_Project::logo64', array($p.shortname)}" alt="{trans 'Project logo'}" />{if $p.private}<img class="lock" src="{media '/idf/img/lock.png'}" alt="{trans 'Private project'}" />{/if}{$p}</a></li>
{/foreach}
</ul>
{/if}
</li>{if $isAdmin}<li><a href="{url 'IDF_Views_Admin::forge'}">{trans 'Forge Management'} {if $pendingProjects > 0}({$pendingProjects}){/if}</a></li>{/if}<li>
<a href="{url 'IDF_Views::faq'}" title="{trans 'Help and accessibility features'}">{trans 'Help'}</a></li>
</ul>

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.06289s using 20 queries.