<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gopagoni Narsing Goud on Medium]]></title>
        <description><![CDATA[Stories by Gopagoni Narsing Goud on Medium]]></description>
        <link>https://medium.com/@gopagoninarsinggoud?source=rss-adf029dbbe2f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*StmtRyhFfzPR9-bL.</url>
            <title>Stories by Gopagoni Narsing Goud on Medium</title>
            <link>https://medium.com/@gopagoninarsinggoud?source=rss-adf029dbbe2f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 15:16:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gopagoninarsinggoud/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Making Bootstrap-4, 16 Grid Compatible]]></title>
            <link>https://medium.com/@gopagoninarsinggoud/making-bootstrap-4-16-grid-compatible-63ca32f7fb6a?source=rss-adf029dbbe2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/63ca32f7fb6a</guid>
            <category><![CDATA[bootstrap-4]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Gopagoni Narsing Goud]]></dc:creator>
            <pubDate>Fri, 24 Aug 2018 05:59:00 GMT</pubDate>
            <atom:updated>2018-08-24T06:42:43.473Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the sites I was working on required a 16 Grid template. With my design requirement being 16 Grid but the bootstrap 4 I was using only supporting 12 grid structure, I needed a solution. There seemed no other options save for conversion of Bootstrap-4 to 16 grid compatibility or use of the lower version of Bootstrap. This was until bootstrap provides the support for downloading a customized version like<a href="http://getbootstrap.com/docs/3.3/customize/"> http://getbootstrap.com/docs/3.3/customize/</a>.</p><p>I Google it for hours at end but could not arrive at any viable solution initially. At last, I arrived at a plausible solution to make Bootstrap 4 work with a 16 Grid template.</p><p>Here’s the fix I administered:</p><p>First bootstrap.min.css, a minified version of bootstrap.css was included in our template to use bootstrap css. Bootstrap.css is the output of bootstrap.scss.</p><p>I had found a way to change the behavior. For (calculating?) declaring all variables of the framework, bootstrap.scss uses _variables.scss.</p><p>According to the requirement, _<strong>variables.scss</strong> file needs to finds the <strong>$grid-columns</strong> variable in order to change it to the specific value of grids (eg. 16, in this case).</p><p>The <a href="https://sass-lang.com/">sass</a> tool is then used to run the conversion from scss to css file ex:</p><blockquote><strong>sass bootstrap/scss/bootstrap.scss:bootstrap/css/bootstrap.css</strong></blockquote><p>The converted bootstrap.css can now be included in the template or minimized with any online tool for use.</p><p>Gratitude goes out to SASS and Bootstrap framework for making it easily convertible!</p><p>Provide your valuable comments with the better approach.</p><p>— — — — — — — — — — GOPAGONI NARSING — — — — — — — —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63ca32f7fb6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Varnish (BAN) + Drupal 8]]></title>
            <link>https://medium.com/@gopagoninarsinggoud/varnish-ban-drupal-8-74ca20e74f89?source=rss-adf029dbbe2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/74ca20e74f89</guid>
            <category><![CDATA[varnish]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Gopagoni Narsing Goud]]></dc:creator>
            <pubDate>Sat, 14 Jul 2018 09:00:03 GMT</pubDate>
            <atom:updated>2018-07-14T09:09:10.370Z</atom:updated>
            <content:encoded><![CDATA[<p>The most common tasks that we have with Varnish are “Setup Varnish” and “Invalidate cache” (BAN or Purge) on content update/modification.</p><p>In this section, we are going to cover the “Invalidating Cache” part with Drupal8. Below are the steps I followed after reading various articles from Internet and Drupal documentation..</p><p><strong>Modules: </strong>Below are the list of the modules used for invalidating the Cache on a content update.</p><p>Purge, Purge Tokens, Purge UI , Purge Drush, Cron Processor, varnish Purger, Varnish Purger Tags.</p><p><strong>Drupal Configurations:</strong></p><ol><li><strong>Varnish Purger Settings: </strong>After enabling the above listed modules.</li><li>Add New Purger at : admin/config/development/performance/purge</li><li>Click On the Add Purger &gt;&gt; Select Varnish Purger</li><li>Configure Newly Created Purger :</li></ol><blockquote>Name : Varnish (As you wish),</blockquote><blockquote>Type: Tag,</blockquote><blockquote>Headers : Hostname: 127.0.0.1 (Site domain),</blockquote><blockquote>Port : 80 (default value),</blockquote><blockquote>Path : / (default value),</blockquote><blockquote>Request Method: BAN (default value),</blockquote><blockquote>Scheme: http (default value)</blockquote><blockquote>In the Headers section : Header/Value : X-Drupal-Cache-Tags /[invalidation:expression]</blockquote><p>Leave the rest as default and save it.</p><p><strong>5. Services.yml : “</strong>http.response.debug_cacheability_headers: true” in the services.yml at sites/default/services.yml.</p><p><strong>6.Settings.php:</strong></p><ol><li>As varnish working as a reverse proxy, every client request hits the varnish first and if the cache is available in the varnish it serves from it otherwise request hits the Apache server, In this architecture, Apache is always servers as a local, when you check the logs at “admin/reports/dblog” it always logs the request as from localhost or 127.0.0.1. To fix this use the below settings in at“sites/default/settings.php”.</li></ol><blockquote>$settings[‘reverse_proxy’] = TRUE;</blockquote><blockquote>$settings[‘reverse_proxy_addresses’] = array(‘127.0.0.1’);</blockquote><p><strong>Varnish configurations (default.vcl)</strong></p><p>Check for Drupal configured <a href="https://gist.github.com/gopagoninarsing/bf6caeaeb32c75f1ac66636d3b3f81a8"><strong>default.vcl</strong></a></p><p>For BAN to work add below lines of codes in the respective sections of default.vcl (/etc/varnish/default.vcl)</p><p>sub vcl_recv</p><pre><em>if (req.method == “BAN”) {<br>  if (!client.ip ~ purge) {<br>    return (synth(403, “Not allowed.”));<br>  }</em></pre><pre><em>  if (req.http.X-Drupal-Cache-Tags) {<br>    ban(“obj.http.X-Drupal-Cache-Tags ~ “ + req.http.X-Drupal-Cache-Tags);<br>  } else {<br>    return (synth(403, “X-Drupal-Cache-Tags header missing.”));<br>  }<br>  return (synth(200, “Ban added.”));<br>}</em></pre><p>sub vcl_backend_response</p><pre><em>set beresp.http.X-Url = bereq.url;<br>set beresp.http.X-Host = bereq.http.host;</em></pre><p>sub vcl_deliver:</p><pre><em> unset resp.http.X-Url;<br> unset resp.http.X-Host;<br> unset resp.http.X-Drupal-Cache-Tags;<br> if (obj.hits &gt; 0) {<br> set resp.http.X-Drupal-Cache-Tags = “HIT”;<br> }<br> else {<br>  set resp.http.X-Drupal-Cache-Tags = “MISS”;<br> }</em></pre><p>Restart the Varnish “ service varnish restart”</p><p>Configure the “Cron processor” at /admin/config/system/cron/jobs (here module used: <a href="https://www.drupal.org/project/ultimate_cron">ultimate_cron</a>)</p><p><strong>Varnish Testing:</strong></p><ol><li>After configuring all the above, open your site as an anonymous user.</li><li>Open Network settings in the Firebug/Developer tools.</li><li>Look in the Response Headers for : X-Drupal-Cache-Tags:HIT/MISS and Via: 1.1 varnish-v4</li><li>And also header <strong>X-Varnish:</strong> 98320 32773, which are the time-stamps varnished cached time and request time. If it displays “single or one” time-stamp then you can assume that page is not served from Varnish.</li></ol><p><strong>Testing Cache Invalidation (BAN):</strong></p><ol><li>Edit any node (entity) of your site.</li><li>Either run cron (Cron Processor) Manually which process the BAN queue requests or use drush command “ drush p-queue-work ”</li><li>Using<strong> </strong>drush command<strong> drush p-queue-work</strong> on success, results with processed items count.</li><li>To check BAN list use console command:</li></ol><pre>varnishadm </pre><pre>varnish&gt; ban.list</pre><pre>Present bans:<br>1531552306.892412 40 — obj.http.X-Drupal-Cache-Tags ~ search_api_list:course_search<br>1531552306.891534 0 — obj.http.X-Drupal-Cache-Tags ~ group_list<br>1531552306.890689 0 — obj.http.X-Drupal-Cache-Tags ~ group:18<br>...<br>...</pre><p>With all the above settings and configurations you can easily configure the Varnish with Cache invalidation. Also, make sure the Cache Max age must be greater than 0 (Zero) and must not be “private or no-cache” because Varnish always respects the caching conditions provided by the backend application.</p><p>Hope this helps someone who is trying to configure varnish for their applications. Please drop a comment for the suggestions.</p><p>— — — — — — — —Thank You @Narsing Gopagoni — — — — — — — — —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74ca20e74f89" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>