Skip to content

Commit

Permalink
improve md
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Jun 6, 2024
1 parent 7e8e25a commit 783280b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
6 changes: 3 additions & 3 deletions docs/recipes/QOQ_Sucks.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
}
-->
## The good, the bad and the ugly ##
# The good, the bad and the ugly

This document explains why Query of Queries (QoQ) may or may not be the best approach for your use case.

Expand All @@ -48,7 +48,7 @@ If the native QoQ engine fails on a single table query, by default, Lucee will a

See `LUCEE_QOQ_HSQLDB_DISABLE` and `LUCEE_QOQ_HSQLDB_DEBUG` under [[running-lucee-system-properties]].

### Example: ###
## Example:

```lucee+trycf
<cfscript>
Expand Down Expand Up @@ -126,7 +126,7 @@ In this example, we have two different methods of queries.

3) Execute it in the browser and we get two results (Query of Query execution time and Query filter/sort execution time). Query filter executes at least twice as fast as query of query. Because QoQ loops over and over again, it is slower. If you can avoid QoQ and use the Query filter/sort, your code will execute much faster.

### Footnotes ###
## Footnotes

You can see these details in the video here:

Expand Down
20 changes: 11 additions & 9 deletions docs/recipes/application-context-set-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@
]
}
-->
# Event Handling in Application.cfc

Lucee provides several event handling functions within `Application.cfc` that can be used to manage different stages and types of requests. Here is an overview of these functions and their usage.

### OnApplicationStart ###
## OnApplicationStart

This method is triggered when the application starts.

Expand All @@ -51,7 +53,7 @@ component {
}
```

### OnSessionStart ###
## OnSessionStart

This method is triggered when a session starts.

Expand All @@ -75,7 +77,7 @@ component {
}
```

### OnRequest ###
## OnRequest

This method handles the actual request. In Lucee, this function is called even if the target page does not exist physically or is never used.

Expand All @@ -87,7 +89,7 @@ component {
}
```

### OnCFCRequest ###
## OnCFCRequest

Similar to "onRequest", but this function is used to handle remote component calls (HTTP Webservices).

Expand All @@ -99,7 +101,7 @@ component {
}
```

### OnError ###
## OnError

This method is triggered when an uncaught exception occurs in this application context.

Expand All @@ -113,7 +115,7 @@ component {

As arguments you receive the exception (cfcatch block) and the eventName.

### OnAbort ###
## OnAbort

This method is triggered when a request is ended with help of the tag `<cfabort>`.

Expand All @@ -125,7 +127,7 @@ component {
}
```

### OnDebug ###
## OnDebug

This method is triggered when debugging is enabled for this request.

Expand All @@ -137,7 +139,7 @@ component {
}
```

### OnMissingTemplate ###
## OnMissingTemplate

This method is triggered when a requested page was not found and **no function "onRequest" is defined**.

Expand All @@ -149,7 +151,7 @@ component {
}
```

## Application.cfc Default Template ##
## Application.cfc Default Template

Below you can find an Application.cfc template that may serve as a starting point for your own applications settings with Lucee CFML engine.

Expand Down
2 changes: 1 addition & 1 deletion docs/recipes/cache-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
]
}
-->
## List existing Cache Connections
# List existing Cache Connections

There is now a built-in function in Lucee to list existing cache connections, but you can also easily do this using the following:

Expand Down
2 changes: 1 addition & 1 deletion docs/recipes/cached-within-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]
}
-->
## Cache a Query for the current request
# Cache a Query for the current request

Perhaps you're familiar with the "cachedwithin" attribute of the tag [tag-query], which is normally used as follows:

Expand Down

0 comments on commit 783280b

Please sign in to comment.