Testing three type of caches: persistent, non-persistent and two-level.
- MacBook Air
- 13-inch, Mid 2012
- Processor 1.8 GHz Intel Core i5
- Memory 8 GB 1600 MHz DDR3
/* | |
This example was built using standard create-react-app out of the box with no modifications or ejections | |
to the underlying scripts. | |
In this example, i'm using Google as a social provider configured within the Cognito User Pool. | |
Each step also represents a file, so you can see how I've chosen to organize stuff...you can do it however | |
you'd like so long as you follow the basic flow (which may or may not be the official way....but its what I found that works. | |
The docs are pretty horrible) | |
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Change the canonical link for the shop page | |
* Credit: Scott Weiss of somethumb.com | |
* Yoast Doc: https://developer.yoast.com/features/seo-tags/canonical-urls/api/ | |
* Last Tested: Jan 25 2017 using Yoast SEO 6.0 on WordPress 4.9.1 | |
*/ | |
add_filter( 'wpseo_canonical', 'yoast_seo_canonical_change_woocom_shop', 10, 1 ); |
<?php | |
function sign($method, $url, $data, $consumerSecret, $tokenSecret) | |
{ | |
$url = urlEncodeAsZend($url); | |
$data = urlEncodeAsZend(http_build_query($data, '', '&')); | |
$data = implode('&', [$method, $url, $data]); | |
$secret = implode('&', [$consumerSecret, $tokenSecret]); | |
<?xml version="1.0"?> | |
<!-- license --> | |
<config> | |
<global> | |
<!-- global config --> | |
</global> | |
<frontend> | |
<events> | |
<!-- disble logs --> | |
<controller_action_predispatch> |
#region Copyright (c) 2006-2013 LOKAD SAS. All rights reserved | |
// This document is shared under BSD license | |
#endregion | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; |
<?php | |
/* | |
* This script deletes duplicate images and imagerows from the database of which the images are not present in the filesystem. | |
* It also removes images that are exact copies of another image for the same product. | |
* And lastly, it looks for images that are on the filesystem but not in the database (orphaned images). | |
* | |
* This script can most likely be optimized but since it'll probably only be run a few times, I can't be bothered. | |
* | |
* Place scripts in a folder named 'scripts' (or similar) in the Magento root. |
<?php | |
/** | |
* Drop this into the shell directory in the Magento root and run with -h to see all options. | |
*/ | |
require_once 'abstract.php'; | |
/** | |
* Fix duplicate url keys for categories and products to work with the 1.8 alpha1 CE url key constraints. |
public sealed class NonSerializingMemoryDocumentStore : IDocumentStore | |
{ | |
readonly ConcurrentDictionary<string,IStoreInfo> _store = new ConcurrentDictionary<string, IStoreInfo>(); | |
readonly IDocumentStrategy _strategy; | |
public interface IStoreInfo | |
{ | |
IEnumerable<DocumentRecord> Enumerate(); | |
} |
/* somewhere in your Core.CQRS */ | |
// Base class for all ES-based aggregate command handling components; | |
// | |
// NOTE: "Component" is a logical grouping of message handlers by function | |
// They provide good place to encapsulate chaining of cross-cutting concerns | |
// into a pipeline, providing simplified helper methods for registration of message handlers | |
// | |
// Components are similar to Services, thus they only contain handlers of single type (ie Command Handlers only) | |
// Components operate on envelope (infrastructure) level |