Skip to content

Instantly share code, notes, and snippets.

View MarcoMiltenburg's full-sized avatar

Marco Miltenburg MarcoMiltenburg

View GitHub Profile
    use phpFastCache\CacheManager;

    $cache = CacheManager::Memcached();

    $keyword_webpage = md5($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].$_SERVER['QUERY_STRING']);
    // try to get from Cache first.
    $resultsItem = $cache->getItem($keyword_webpage)

 if(!$resultsItem->isHit()) {
@MarcoMiltenburg
MarcoMiltenburg / web.config
Created April 13, 2016 18:38
web.config to run Classic ASP, PHP and ASP.NET Webpages side-by-side with an ASP.NET Core application
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="Classic ASP via ISAPI" path="*.asp" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="File" />
<add name="PHP 5.6 via FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\inetpub\cgi\PHP\5.6.x\php-cgi.exe" resourceType="File" />
<add name="ASP.NET via IntegratedMode" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv4.0" />
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
</handlers>
<httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/>