src/com/gitblit/GitBlit.java | ●●●●● patch | view | raw | blame | history | |
src/com/gitblit/utils/ObjectCache.java | ●●●●● patch | view | raw | blame | history |
src/com/gitblit/GitBlit.java
@@ -65,7 +65,6 @@ import com.gitblit.models.FederationProposal; import com.gitblit.models.FederationSet; import com.gitblit.models.Metric; import com.gitblit.models.ObjectCache; import com.gitblit.models.RepositoryModel; import com.gitblit.models.ServerSettings; import com.gitblit.models.ServerStatus; @@ -76,6 +75,7 @@ import com.gitblit.utils.JGitUtils; import com.gitblit.utils.JsonUtils; import com.gitblit.utils.MetricUtils; import com.gitblit.utils.ObjectCache; import com.gitblit.utils.StringUtils; /** src/com/gitblit/utils/ObjectCache.java
File was renamed from src/com/gitblit/models/ObjectCache.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ package com.gitblit.models; package com.gitblit.utils; import java.io.Serializable; import java.util.Date; @@ -21,7 +21,10 @@ import java.util.concurrent.ConcurrentHashMap; /** * Reusable object cache. * Reusable coarse date-based object cache. The date precision is in * milliseconds and in fast, concurrent systems this cache is too simplistic. * However, for the cases where its being used in Gitblit this cache technique * is just fine. * * @author James Moger * @@ -60,8 +63,11 @@ } public X getObject(String name) { if (cache.containsKey(name)) { return cache.get(name).object; } return null; } public void updateObject(String name, X object) { this.updateObject(name, new Date(), object);