This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
using NLog; | |
using StackExchange.Redis; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class RedisCache : ICache | |
{ | |
private readonly IConfiguration _config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cutoff = 30000; | |
using (var delayCancellation = new CancellationTokenSource()) | |
{ | |
var mainTask = Task.Run(() => | |
{ | |
// Whatever needs doing... | |
}); | |
var delayTask = Task.Delay(cutoff, delayCancellation.Token).ContinueWith(async t => | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'), | |
path = require('path'); | |
module.exports = function(dir, ignore) { | |
var result = {}; | |
loadModules(dir, result, ignore); | |
return result; | |
}; | |
function convertToCamelCase(value) { |