Drupal

What is Entity?

* Entity provide unified way to work with different data units in Drupal.
* Entity is an instance of an entity type defined in Drupal.
* Drupal 7 is all about entities. They are everywhere nodes, users, comments, taxonomy terms.
* Drupal 6 field system was only used on content types. but now, field-able entities makes Drupal more flexible.
* Drupal 8 provides two entity types: 1) Configuration entity 2) Content entity

Entity Types >> Bundles >> Fields >> Entities

Managing Drupal Caches & Performance

* Configuration Best practices - Disable unused modules & update manager module
*  Views Caching
*  Use cache replacements like Memcache, File cache, Redis (a key-value store)
*  Cache and optimize Specific Components
     -> Entity Cache, Display cache, Advanced css/js aggregration, Image Lazyloader, Speedy, Fast 404, Authcache
* External Caching like Varnish, Cache expiration, Boost

How does caching work in Drupal?

Cache pages for anonymous users only works for anonymous users, and the page markup is stored in database (to reduce the number of queries). And you can check the HTTP Header X-Drupal-Cache to see if this cache is HIT.

Cache blocks (if Page caching is disabled) works for anonymous and logged-in users. And again, the whole block markup is stored in database for the same reason.

Minimum cache lifetime is the amount of time before the Page cache gets cleared (the cache is cleared on cron run).

Nodeaccess Module

  • Nodeaccess is a Drupal access control module which provides view, edit and delete access to nodes. 
  • Users with the 'grant node permissions' permission will have a grant tab on node pages which allows them to grant access to that node by user or role.