Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
namespace ConsoleApp2
{
public class ReloadingCache:IDisposable
{
private List<string> _cachedItems;
private System.Threading.Timer _timer;
private System.Threading.Mutex _mutex = new System.Threading.Mutex();
@Drawaes
Drawaes / Cache.cs
Last active May 20, 2017 23:19
Simple resetting cache
using System.Collections.Generic;
public class ReloadingCache
{
private List<string> _cachedItems;
private System.Threading.Timer _timer;
public ReloadingCache()
{
//Load the first lot of data to stop consumers getting null
@connor
connor / .jshintrc.js
Created January 11, 2012 22:20
jshintrc example
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.