Set values you'd like to cache to the content of a FlowFile. Then pass it to PutDistributedCache.
You can enrich incoming FlowFiles by adding an attribute with a value fetched from DistributedCache.
| #!/bin/bash | |
| # Install Wavefront Proxy and configures standard telegraf plugin | |
| # #### | |
| function logo() { | |
| cat << "EOT" | |
| __ __ _____ __ | |
| / \ / \_____ ___ __ _____/ ____\______ ____ _____/ |_ | |
| \ \/\/ /\__ \\ \/ // __ \ __\\_ __ \/ _ \ / \ __\ | |
| \ / / __ \\ /\ ___/| | | | \( <_> ) | \ | |
| public class AuthModule : NancyModule | |
| { | |
| public AuthModule() | |
| { | |
| Post("/login", async _ => | |
| { | |
| var myclaims = new List<Claim>(new Claim[] { new Claim("Id", "SOME USER ID FROM SOMEWHERE!!") }); | |
| var claimsPrincipal = new ClaimsPrincipal(new ClaimsIdentity(myclaims, "MyCookieMW")); |
| // This is an example of using elastic's BulkProcessor with Elasticsearch. | |
| // | |
| // See https://github.com/olivere/elastic and | |
| // and https://github.com/olivere/elastic/wiki/BulkProcessor | |
| // for more details. | |
| /* | |
| * This example illustrates a simple process that performs bulk processing | |
| * with Elasticsearch using the BulkProcessor in elastic. | |
| * |
| using Dapper; | |
| using Oracle.ManagedDataAccess.Client; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Data; | |
| using System.Linq; | |
| public class OracleDynamicParameters : Dapper.SqlMapper.IDynamicParameters { | |
| private static Dictionary<SqlMapper.Identity, Action<IDbCommand, object>> paramReaderCache = new Dictionary<SqlMapper.Identity, Action<IDbCommand, object>>( ); |